Commit Graph

77416 Commits (2308ff2cbfd3a86436eda32253981d02702bb09d)

Author SHA1 Message Date
J. Nick Koston c5cc9801a6
Cache serialize of manifest for loaded integrations (#117965)
* Cache serialize of manifest for loaded integrations

The manifest/list and manifest/get websocket apis
are called frequently when moving around in the UI.
Since the manifest does not change we can make
the the serialized version a cached property

* reduce

* reduce
2024-05-23 10:52:05 -04:00
J. Nick Koston 09e7156d2d
Fix turbojpeg init doing blocking I/O in the event loop (#117971)
* Fix turbojpeg init doing blocking I/O in the event loop

fixes
```
Detected blocking call to open inside the event loop by integration camera at homeassistant/components/camera/img_util.py, line 100: TurboJPEGSingleton.__instance = TurboJPEG() (offender: /usr/local/lib/python3.12/ctypes/util.py, line 276: with open(filepath, rb) as fh:), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+camera%22
```

* Update homeassistant/components/camera/img_util.py

* Fix turbojpeg init doing blocking I/O in the event loop

fixes
```
Detected blocking call to open inside the event loop by integration camera at homeassistant/components/camera/img_util.py, line 100: TurboJPEGSingleton.__instance = TurboJPEG() (offender: /usr/local/lib/python3.12/ctypes/util.py, line 276: with open(filepath, rb) as fh:), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+camera%22
```

* already suppressed and logged
2024-05-23 10:50:25 -04:00
epenet 6b2ddcca5e
Move rainmachine coordinator to separate module (#117983)
* Move rainmachine coordinator to separate module

* Coverage
2024-05-23 16:41:50 +02:00
epenet 162f5ccbde
Add snapshot platform tests to rainmachine (#117978)
* Add snapshot tests to rainmachine

* Add sensor and switch tests
2024-05-23 16:29:39 +02:00
epenet 0c243d699c
Use SnapshotAssertion in rainmachine diagnostic tests (#117979)
* Use SnapshotAssertion in rainmachine diagnostic tests

* Force entry_id

* Adjust

* Fix incorrect fixtures

* Adjust
2024-05-23 16:22:31 +02:00
Brett Adams 880b315890
Add switch platform to Teslemetry (#117482)
* Add switch platform

* Add tests

* Add test

* Fixes

* ruff

* Rename to storm watch

* Remove valet

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* ruff

* Review feedback

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-05-23 14:28:18 +02:00
epenet bc51a4c524
Add snapshot tests to moehlenhoff_alpha2 (#117967)
* Add tests to moehlenhoff_alpha2

* Adjust coverage

* Adjust coverage

* Adjust coverage

* Adjust patch

* Adjust
2024-05-23 11:54:20 +02:00
epenet bbe8e69795
Cleanup pylint ignore (#117964) 2024-05-23 11:09:33 +02:00
dontinelli 6682244abf
Improve fyta tests (#117661)
* Add test for init

* update tests

* split common.py into const.py and __init__.py

* Update tests/components/fyta/__init__.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* add autospec, tidy up

* adjust len-test

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-23 10:51:30 +02:00
Joost Lekkerkerker e8f544d216
Bump airgradient to 0.4.1 (#117963) 2024-05-23 10:25:54 +02:00
J. Nick Koston 6c6a5f496a
Simplify async_track_time_interval implementation (#117956) 2024-05-22 21:56:49 -10:00
Matthias Alphart fc4ea774ca
Fix run-in-env script for not running in venv (#117961) 2024-05-23 09:14:59 +02:00
kaareseras cd14d9b0e3
Add Azure data explorer (#68992)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-05-23 09:14:09 +02:00
Galorhallen 767d971c5f
Better handling of EADDRINUSE for Govee light (#117943) 2024-05-23 08:45:49 +02:00
Jan-Philipp Benecke 88257c9c42
Allow to reconfigure integrations with `single_config_entry` set (#117939) 2024-05-23 08:41:12 +02:00
Sid cc17725d1d
Bump ruff to 0.4.5 (#117958) 2024-05-23 07:29:09 +02:00
Shay Levy 178c185a2f
Add Shelly debug logging for async_reconnect_soon (#117945) 2024-05-22 23:15:15 -04:00
J. Nick Koston e663d4f602
Refactor state_reported listener setup to avoid merge in async_fire_internal (#117953)
* Refactor state_reported listener setup to avoid merge in async_fire_internal

Instead of merging the listeners in async_fire_internal, setup the listener for
state_changed at the same time so async_fire_internal can avoid having to copy
another list

* Refactor state_reported listener setup to avoid merge in async_fire_internal

Instead of merging the listeners in async_fire_internal, setup the listener for
state_changed at the same time so async_fire_internal can avoid having to copy
another list

* tweak

* tweak

* tweak

* tweak

* tweak
2024-05-22 23:14:50 -04:00
Paulus Schoutsen 1f7245ecf2
Update LLM no tools message (#117935) 2024-05-22 21:17:03 -04:00
Jan Bouwhuis 050fc73056
Refactor shared mqtt schema's to new module (#117944)
* Refactor mqtt schema's to new module

* Remove unrelated change
2024-05-23 01:12:25 +02:00
Mischa Siekmann ad69a23fda
Send MEDIA_ANNOUNCE flag to ESPHome media_player (#116993) 2024-05-23 09:47:34 +12:00
Peter eb76386c68
Prevent time pattern reschedule if cancelled during job execution (#117879)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-22 10:36:03 -10:00
Kevin Worrel 40fdc840ab
Add number entities for screenlogic values used in SI calc (#117812) 2024-05-22 09:52:09 -10:00
Michael be6598ea4f
Store runtime data inside the config entry in iBeacon (#117936)
store runtime data inside the config entry

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-22 20:44:41 +02:00
epenet deded19bb3
Add available and state to SamsungTV remote (#117909)
* Add available and state to SamsungTV remote

* Align turn_off

* Fix merge

* Fix merge (again)
2024-05-22 20:35:34 +02:00
J. Nick Koston 0d5c8e30cd
Migrate issue registry to use singleton helper (#117848)
* Migrate issue registry to use singleton helper

The other registries were already migrated, but since this
one had a read only flag, it required a slightly different
solution since it uses the same hass.data key

* refactor
2024-05-22 14:13:19 -04:00
Allen Porter 7a6b107248
Move nest diagnostic tests to use snapshots (#117929) 2024-05-22 14:11:07 -04:00
Joost Lekkerkerker 0c5296b38f
Add lock to token validity check (#117912) 2024-05-22 14:10:23 -04:00
puddly 55c8ef1c7b
Simplify SkyConnect setup flow (#117868)
* Delay firmware probing until after the user picks the firmware type

* Remove confirmation step

* Fix unit tests

* Simplify unit test patching logic

Further simplify unit tests

* Bump Zigbee firmware up to the first choice

* Reuse `async_step_pick_firmware` during options flow

* Proactively validate all ZHA entries, not just the first
There can only be one (for now) so this changes nothing functionally

* Add unit test for bad firmware when configuring Thread
2024-05-22 14:09:30 -04:00
J. Nick Koston 6113b58e9c
Speed up registry indices (#117897)
* Use defaultdict for registry indices

defaultdict is faster and does not have to create an empty
dict that gets throw away when the key is already present

* Use defaultdict for registry indices

defaultdict is faster and does not have to create an empty
dict that gets throw away when the key is already present
2024-05-22 14:07:39 -04:00
Michael Hansen f99ec87338
Fail if targeting all devices in the house in service intent handler (#117930)
* Fail if targeting all devices in the house

* Update homeassistant/helpers/intent.py

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-22 13:53:31 -04:00
Thomas55555 eeeb5b2725
Add switch for stay out zones in Husqvarna Automower (#117809)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-05-22 18:51:21 +02:00
On Freund f9eb3db897
Bump pyrympro to 0.0.8 (#117919) 2024-05-22 18:14:04 +02:00
tronikos e4130480c3
Google Generative AI: Handle response with empty parts in generate_content (#117908)
Handle response with empty parts in generate_content
2024-05-22 07:47:16 -07:00
mkmer 5b1677ccb7
Use common title for reauth confirm in Whirlpool config flow (#117924)
* Add missing placeholder

* Use common title for reauth
2024-05-22 16:45:54 +02:00
G Johansson d1bdf73bc5
Add clear night to smhi (#115998) 2024-05-22 16:03:48 +02:00
Marc Mueller 5c9c71ba2c
Fix performance regression with SignalType (#117920) 2024-05-22 13:58:37 +02:00
Joost Lekkerkerker 5229f0d0ef
Exclude modbus from diagnostics hassfest check (#117855) 2024-05-22 13:09:20 +02:00
epenet 5ee42ec780
Remove duplicate code in SamsungTV (#117913) 2024-05-22 12:29:25 +02:00
J. Nick Koston 9454dfc719
Bump habluetooth to 3.1.0 (#117905) 2024-05-22 12:28:13 +02:00
J. Nick Koston 4e3c4400a7
Refactor MQTT to replace get_mqtt_data with HassKey (#117899) 2024-05-21 23:21:51 -10:00
Chris b4d0562063
Adopt new runtime entry data model for AlarmDecoder (#117856)
* Adopt new runtime entity data model for AlarmDecoder

Transition the AlarmDecoder integration to the new runtime entity model.

* Apply change suggestions by epenet

Tested & applied the suggestions from epenet.
2024-05-22 10:47:37 +02:00
epenet b898c86c89
Add MAC cleanup to SamsungTV (#117906)
* Add MAC cleanup to samsungtv

* Simplify

* Adjust

* leftover

* Appl

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update diagnostics tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-22 10:36:21 +02:00
MatthewFlamm 52bb02b376
Keep observation data valid for 60 min and retry with no data for nws (#117109)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-21 22:14:05 -10:00
epenet cddb057eae
Adjust conftest type hints (#117900) 2024-05-22 09:34:17 +02:00
epenet 39b4e890a0
Add coordinator to SamsungTV (#117863)
* Introduce samsungtv coordinator

* Adjust

* Adjust media_player

* Remove remote

* Adjust

* Fix mypy

* Adjust

* Use coordinator.async_refresh
2024-05-22 09:20:05 +02:00
Jakob Schlyter 2e68363755
Improve typing via hassfest serializer (#117382) 2024-05-22 08:22:18 +02:00
J. Nick Koston 1985a2ad8b
Small speed up to creating flows (#117896)
Use a defaultdict instead of setdefault
2024-05-22 08:16:08 +02:00
Robert Svensson 5abf77662a
Support carbon dioxide and formaldehyde sensors in deCONZ (#117877)
* Add formaldehyde sensor
* Add carbon dioxide sensor
* Bump pydeconz to v116
2024-05-22 07:33:55 +02:00
J. Nick Koston f42b98336c
Reduce overhead to validate mqtt topics (#117891)
* Reduce overhead to validate mqtt topics

valid_topic would iterate all the chars 4x, refactor to only
do it 1x

valid_subscribe_topic would enumerate all the chars when there was
no + in the string

* check if adding a cache helps

* tweak lrus based on testing stats

* note to future maintainers

* note to future maintainers

* keep standard lru_cache size as increasing makes no material difference
2024-05-21 23:11:05 -04:00