Commit Graph

14097 Commits

Author SHA1 Message Date
Jan Bouwhuis
c81a38effb Mqtt prepare test base part1 (#89796)
* Refactor test_reloadable

* Refactor test_disabling_and_enabling_entry

* optimize test_unload_config_entry

* Cleanup help_test_unload_config_entry

* cleanup test_unload_entry

* Update test tls_version

* More tests to entry only

* Add validate and hassconfig patch

* Revert fixture changes patch_hass_config

* Follow up comments
2023-03-16 15:57:01 +01:00
Erik Montnemery
f55aaf7664 Drop unused Google entity settings from cloud (#89786) 2023-03-16 11:15:38 +01:00
Vincent Knoop Pathuis
273d794f7a Add device class for Landis+Gyr GJ energy sensor (#89522) 2023-03-16 11:12:05 +01:00
epenet
69e85b3216 Fix SFR Box diagnostics (#89783) 2023-03-16 11:09:54 +01:00
epenet
913156b0e0 Avoid lingering timer on script shutdown (#89753) 2023-03-16 08:00:21 +01:00
J. Nick Koston
99d6b1fa57 Migrate States to use a table manager (#89769) 2023-03-15 16:19:43 -10:00
J. Nick Koston
4080d68489 Fix logbook tests failing because time was not url encoded correctly (#89770) 2023-03-15 15:29:41 -10:00
J. Nick Koston
e379aa23bd Migrate StateAttributes to use a table manager (#89760)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-03-15 15:26:29 -10:00
J. Nick Koston
aec2d63302 Add keep_days to recorder.purge_entities (#89726) 2023-03-15 11:13:47 -10:00
Michael
d4edec2863 Move calculation of current value into lib in Fritz!SmartHome (#89150) 2023-03-15 18:59:03 +01:00
Marcel van der Veldt
fceb208381 Abort Hue config flow if bridge can not be reached (#88893)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-03-15 18:55:34 +01:00
starkillerOG
4eee626770 Reolink check firmware (#88903) 2023-03-15 18:54:28 +01:00
epenet
c416d18506 Add WAN information to SFR Box (#89678) 2023-03-15 18:49:57 +01:00
Allen Porter
b588b8b215 Bump ical to 4.5.0 (#89744) 2023-03-15 18:06:46 +01:00
J. Nick Koston
a244749712 Make StatesMetaManager thread-safe when an entity_id is fully deleted from the database and than re-added (#89732)
* refactor to make StatesMetaManager threadsafe

* refactor to make StatesMetaManager threadsafe

* refactor to make StatesMetaManager threadsafe

* refactor to make StatesMetaManager threadsafe

* reduce

* comments
2023-03-15 08:54:02 -04:00
epenet
6270776fbb Add turn_on trigger to Samsung TV (#89018)
* Add turn_on trigger to Samsung TV

* Add tests

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Remove assert

* Cleanup mock_send_magic_packet

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-03-15 12:43:53 +01:00
jan iversen
cd23caff58 Correct modbus serial method parameter (#89738) 2023-03-15 12:27:45 +01:00
epenet
9719f817c0 Bump ruff to 0.0.256 (#89734) 2023-03-15 10:07:12 +01:00
Allen Porter
a91055cc2a Fix additional typing in local calendar tests (#89704)
* Fix additional typing in local calendar tests

* Update tests/components/local_calendar/test_calendar.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-14 19:33:46 -07:00
J. Nick Koston
b906d67c1e Fix filtered purge not removing newer events (#89721) 2023-03-14 16:33:19 -10:00
Allen Porter
4ddcb14053 Add additional CalendarEvent validation (#89533)
Add additional event validation
2023-03-14 20:27:38 -04:00
Jack Boswell
c33ca4f664 Add diagnostics to Starlink (#86328) 2023-03-14 22:24:47 +01:00
Erik Montnemery
c2c809682a Tweak OTBR tests (#89694) 2023-03-14 21:26:16 +01:00
Ernst Klamer
d1969fd0c2 Add water sensor to bthome (#89595)
* Add water sensor to bthome

* Use TOTAL state class for gas water and energy
2023-03-14 19:26:05 +01:00
epenet
71dc98a39c Improve hass_ws_client type hint in tests (#89703) 2023-03-14 16:31:40 +01:00
Allen Porter
1bc4802c04 Move local calendar text fixtures to conftest.py (#89674)
* Move local calendar text fixtures to conftest.py

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Add imports for suggested typing fixes

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-14 08:12:44 -07:00
Erik Montnemery
85e0177195 Add WS command for connecting OTBR to a known Thread network (#89692)
* Add WS command for connecting OTBR to a known Thread network

* Add test
2023-03-14 15:28:06 +01:00
Bram Kragten
a213ef2475 Add websocket command to set preferred thread dataset (#89700) 2023-03-14 15:27:31 +01:00
Jan Bouwhuis
ec1b8b616f Debounce and group MQTT subscriptions (#88862)
* Debounce and group mqtt subscriptions

* Cleanup

* Do not cooldown on resubscribe

* Remove lock from task

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* ruff

* Longer initial cool down. Manages unsubscribes

* Own lock for access to self._pending_subscriptions

* adjust

* Subscribe to highest QoS when sharing subscription

* do not block _pending_subscriptions_lock with io

* Test the highest qos is subscribed at

* Cleanup max qos

* Follow up comments part 1

* Make docstr more generic

* Make max qos update thread safe

* Add lock on clearing _max_qos when resubscribing

* Wait for linger task

* User copy

* Check for key before cleaning up

* Fix lingering task

* Do not use a lock

* do not await _async_queue_subscriptions

* Replace copy with assignment

* Update max qos before returning

* Do not iterate if max_qos == 0

* Do not ieterate subs if max qos == 0

* Set initial cooldown correctly

* Ensure discovery cooldown ends after subscribing

* plan last subscribe with debouncer timeout

* cooldown if self._pending_subscriptions is set

* Revert format changes

* Remove stale assingnment self._last_subscribe

* Remove not used property

* Also check while for pending subscriptions

* revert first added sleep()

* Optimize

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-03-14 11:13:55 +01:00
J. Nick Koston
2cb673db04 Handle bytes data in sql sensors (#89169) 2023-03-13 18:07:05 -10:00
G Johansson
afa58b80bd Default to recorder db for SQL integration (#85436)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-03-13 17:41:32 -10:00
Erik Montnemery
2f4e9c8ef3 Use otbr domain as dataset source (#89653) 2023-03-13 20:56:09 -04:00
Erik Montnemery
d422b0dcc2 Make OTBR add newly created dataset to thread credential store (#89645) 2023-03-13 14:09:09 -04:00
G Johansson
02389960ce Refactor Command line sensor to inherit TemplateSensor (#81222)
* Refactor sensor

* Remove not needed

* block until done

* reset test

* test sensor

* Add time
2023-03-13 17:23:25 +01:00
Erik Montnemery
8a0522ca2a Include extended address in thread discovery data (#89640) 2023-03-13 15:59:22 +01:00
Joakim Sørensen
11e21378b1 Add sensors for supervisor host (#89461)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-03-13 15:39:49 +01:00
epenet
07b25939a2 Use SnapshotAssertion in SFR button tests (#89633) 2023-03-13 15:23:00 +01:00
Thijs Walcarius
cdfb43d403 Address late review comments for frontier_silicon config flow (#89507)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: wlcrs <wlcrs@users.noreply.github.com>
2023-03-13 15:06:45 +01:00
anotherthomas
179cc4d7f7 Improve warnings in mqtt light messages (#89552)
* improved warnings in mqtt light messages.

* fixed tests.
2023-03-13 14:46:16 +01:00
Erik Montnemery
a230732087 Correct naming of some otbr tests (#89631) 2023-03-13 13:56:08 +01:00
epenet
f3da95fb1f Use SnapshotAssertion in SFR binary sensor tests (#89624) 2023-03-13 13:37:51 +01:00
starkillerOG
6e10cd81dd Use repair issue when port enable fails in Reolink (#89591)
* Reolink use repair issue for disabled ports

* fix styling

* Add port repair issue tests

* Update homeassistant/components/reolink/strings.json

Co-authored-by: Erik Montnemery <erik@montnemery.com>

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-13 11:43:41 +01:00
David Poll
7284af6a3e Add an in-memory-preloading loader for Jinja imports (#88850)
* Adds a loader to enable jinja imports.

* Switch to in-memory

* Move loading custom_jinja off of the event loop

* Raise TemplateNotFound if template doesn't exist

* Fix docstring

* Adds a service to reload custom jinja

* Remove IO from test setup

* Improve coverage and small refactor

* Incorporate feedback and use .jinja extension

* Check the loaded sources in test.

* Incorporate PR feedback.

* Update homeassistant/helpers/template.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-13 11:00:05 +01:00
epenet
5e73ad9cb0 Use SnapshotAssertion in SFR sensor tests (#89619)
* Use SnapshotAssertion in SFR sensor tests

* Name snapshots

* Cleanup const.py

* Remove name from snapshot
2023-03-13 10:45:59 +01:00
Erik Montnemery
fd5c56fc7d Rename modules named repairs.py which are not repairs platforms (#89618) 2023-03-13 09:44:20 +01:00
J. Nick Koston
4dcf7c6267 Fix history_stats test failing during DST (#89589)
Note that there is one test that needs `now()` as it is
timezone aware
2023-03-12 23:03:48 -04:00
Barry Loong
877efc993b Add support for window device class to google assistant (#89564) 2023-03-12 22:45:25 -04:00
J. Nick Koston
b9ac6b4a7c Improve reliability of context id migration (#89609)
* Split context id migration into states and events tasks

Since events can finish much earlier than states we
would keep looking at the table because states as not
done. Make them seperate tasks

* add retry dec

* fix migration happening twice

* another case
2023-03-12 21:41:48 -04:00
J. Nick Koston
459ea048ba Fix old indices never being removed with PostgreSQL (#89599) 2023-03-12 14:07:05 -10:00
J. Nick Koston
c41f91be89 Deduplicate entity_id in the states table (#89557) 2023-03-12 10:01:58 -10:00