Commit Graph
77883 Commits
Author SHA1 Message Date
J. Nick KostonandPaulus Schoutsen c533ca50b1 Fix homeassistant_alerts delaying shutdown (#116340) 2024-04-29 14:09:35 +00:00
J. Nick KostonandPaulus Schoutsen 66538ba34e Add thread safety checks to async_create_task (#116339)
* Add thread safety checks to async_create_task

Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here

* Add thread safety checks to async_create_task

Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here

* missed one

* Update homeassistant/core.py

* fix mocks

* one more internal

* more places where internal can be used

* more places where internal can be used

* more places where internal can be used

* internal one more place since this is high volume and was already eager_start
2024-04-29 14:09:34 +00:00
J. Nick KostonandPaulus Schoutsen 6786479a81 Fix sonos events delaying shutdown (#116337) 2024-04-29 14:09:33 +00:00
J. Nick KostonandPaulus Schoutsen c4c21bc8ea Fix bluetooth adapter discovery delaying startup and shutdown (#116335) 2024-04-29 14:09:33 +00:00
J. Nick KostonandPaulus Schoutsen c3cb79e0e9 Fix wemo push updates delaying shutdown (#116333) 2024-04-29 14:09:32 +00:00
J. Nick KostonandPaulus Schoutsen 1309fc5eda Fix unifiprotect delaying shutdown if websocket if offline (#116331) 2024-04-29 14:09:31 +00:00
J. Nick KostonandPaulus Schoutsen 624eed4b83 Fix august delaying shutdown (#116329) 2024-04-29 14:09:30 +00:00
J. Nick KostonandPaulus Schoutsen d1e7471094 Prevent setup retry from delaying shutdown (#116328) 2024-04-29 14:09:29 +00:00
J. Nick KostonandPaulus Schoutsen f2a101128f Make discovery flow tasks background tasks (#116327) 2024-04-29 14:09:28 +00:00
Jan BouwhuisandPaulus Schoutsen bfcffb5cb1 Fix no will published when mqtt is down (#116319) 2024-04-29 14:09:27 +00:00
abf45a0e0c Fix Aseko binary sensors names (#116251)
* Fix Aseko binary sensors names

* Fix add missing key to strings.json

* Fix remove setting shorthand translation key attribute

* Update homeassistant/components/aseko_pool_live/strings.json

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-29 14:09:26 +00:00
J. Nick KostonandPaulus Schoutsen 2c46db16d4 Fix script in restart mode that is fired from the same trigger (#116247) 2024-04-29 14:09:25 +00:00
Martin HjelmareandPaulus Schoutsen 6d8066afa2 Add matter during onboarding (#116163)
* Add matter during onboarding

* test_zeroconf_not_onboarded_running

* test_zeroconf_not_onboarded_installed

* test_zeroconf_not_onboarded_not_installed

* test_zeroconf_discovery_not_onboarded_not_supervisor

* Clean up

* Add udp address

* Test zeroconf udp info too

* test_addon_installed_failures_zeroconf

* test_addon_running_failures_zeroconf

* test_addon_not_installed_failures_zeroconf

* Clean up stale changes

* Set unique id for discovery step

* Fix tests for background flow

* Fix flow running in background

* Test already discovered zeroconf

* Mock unload entry
2024-04-29 14:09:24 +00:00
ee4f55a5a9 Improve error handling for HTTP errors on Growatt Server (#110633)
* Update dependency growattServer for improved error details

Updating to latest version. Since version 1.3.1 it will raise requests.exceptions.HTTPError for unexpected API responses such as HTTP 405 (rate limiting/firewall)

* Improve error details by raising ConfigEntryAuthFailed

Previous code was returning None which the caller couldn't handle

* Use a more appropiate exception type

* Update homeassistant/components/growatt_server/sensor.py

* Update homeassistant/components/growatt_server/sensor.py

* Fix

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-29 14:09:23 +00:00
J. Nick KostonandGitHub eced3b0f57 Fix usb scan delaying shutdown (#116390)
If the integration page is accessed right before shutdown it
can trigger the usb scan debouncer which was not marked as
background so shutdown would wait for the scan to finish
2024-04-29 10:07:48 -04:00
J. Nick KostonandGitHub 81d2f5b791 Small cleanups to climate entity feature compat (#116361)
* Small cleanups to climate entity feature compat

Fix some duplicate property fetches, avoid generating a new
enum every time supported_features was fetched if there was
no modifier

* param

* param
2024-04-29 15:43:55 +02:00
d1f88ffd1e Prevent Shelly raising in a task (#116355)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-29 08:03:57 -05:00
Marc MuellerandGitHub 8ac493fcf4 Update types packages (#116382) 2024-04-29 14:50:00 +02:00
Marc MuellerandGitHub 6c9f277bbe Update uv to 0.1.39 (#116381) 2024-04-29 14:48:13 +02:00
Marc MuellerandGitHub de65e6b5d1 Update respx to 0.21.1 (#116380) 2024-04-29 14:45:57 +02:00
Marc MuellerandGitHub e060e90858 Update pipdeptree to 2.19.0 (#116376) 2024-04-29 14:44:04 +02:00
Marc MuellerandGitHub 26fad0b786 Update pytest-xdist to 3.6.1 (#116377) 2024-04-29 14:42:57 +02:00
Marc MuellerandGitHub fd52348d57 Update freezegun to 1.5.0 (#116375) 2024-04-29 14:40:47 +02:00
0b8838cab8 Add icons and translations to Habitica (#116204)
* refactor habitica sensors, add strings and icon translations

* Change sensor names

* remove max_health as it is a fixed value

* remove SENSOR_TYPES

* removed wrong sensor

* Move Data coordinator to separate module

* add coordinator.py to coveragerc

* add deprecation warning for task sensors

* remove unused imports and logger

* Revert "add deprecation warning for task sensors"

This reverts commit 9e58053f3b.

* Update homeassistant/components/habitica/strings.json

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

* Update homeassistant/components/habitica/strings.json

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

* Revert "Move Data coordinator to separate module"

This reverts commit f5c8c3c886.

* Revert "add coordinator.py to coveragerc"

This reverts commit 8ae07a4786.

* rename Mana max. to Max. mana

* deprecation for yaml import

* move SensorType definition before TASK_TYPES

* Revert "deprecation for yaml import"

This reverts commit 2a1d58ee5f.

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-29 12:51:38 +02:00
b426c4133d Improve error handling for HTTP errors on Growatt Server (#110633)
* Update dependency growattServer for improved error details

Updating to latest version. Since version 1.3.1 it will raise requests.exceptions.HTTPError for unexpected API responses such as HTTP 405 (rate limiting/firewall)

* Improve error details by raising ConfigEntryAuthFailed

Previous code was returning None which the caller couldn't handle

* Use a more appropiate exception type

* Update homeassistant/components/growatt_server/sensor.py

* Update homeassistant/components/growatt_server/sensor.py

* Fix

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-29 12:02:49 +02:00
Martin HjelmareandGitHub 0e0ea0017e Add matter during onboarding (#116163)
* Add matter during onboarding

* test_zeroconf_not_onboarded_running

* test_zeroconf_not_onboarded_installed

* test_zeroconf_not_onboarded_not_installed

* test_zeroconf_discovery_not_onboarded_not_supervisor

* Clean up

* Add udp address

* Test zeroconf udp info too

* test_addon_installed_failures_zeroconf

* test_addon_running_failures_zeroconf

* test_addon_not_installed_failures_zeroconf

* Clean up stale changes

* Set unique id for discovery step

* Fix tests for background flow

* Fix flow running in background

* Test already discovered zeroconf

* Mock unload entry
2024-04-29 10:59:36 +02:00
8153ff78bf Add Button for TotalConnect (#114530)
* add button for totalconnect

* test button for totalconnect

* change to zone.can_be_bypassed

* Update homeassistant/components/totalconnect/button.py

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

* Update homeassistant/components/totalconnect/button.py

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

* Update homeassistant/components/totalconnect/button.py

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

* remove unused logging

* Update homeassistant/components/totalconnect/button.py

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

* Update homeassistant/components/totalconnect/button.py

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

* fix button and test

* Revert "bump total_connect_client to 2023.12.1"

This reverts commit 189b7dcd89cf3cc8309dacc92ba47927cfbbdef3.

* bump total_connect_client to 2023.12.1

* use ZoneEntity for Bypass button

* use LocationEntity for PanelButton

* fix typing

* add translation_key for panel buttons

* mock clear_bypass instead of disarm

* use paramaterize

* use snapshot

* sentence case in strings

* remove un-needed stuff

* Update homeassistant/components/totalconnect/button.py

* Apply suggestions from code review

* Fix

---------

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-29 09:47:05 +02:00
Erik MontnemeryandGitHub 0425b7aa6d Reduce scope of test fixtures for the pylint plugin tests (#116207) 2024-04-29 08:21:31 +02:00
J. Nick KostonandGitHub 381ffe6eed Use built-in aiohttp timeout instead of asyncio.timeout in media_player (#116364)
* Use built-in aiohttp timeout instead of asyncio.timeout in media_player

Avoids having two timeouts running to fetch images

* fix mock
2024-04-29 07:38:40 +02:00
Austin MroczekandGitHub 8c73c1e1a5 Bump total_connect_client to 2024.4 (#116360) 2024-04-28 21:02:10 -05:00
J. Nick KostonandGitHub 164403de20 Add thread safety checks to async_create_task (#116339)
* Add thread safety checks to async_create_task

Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here

* Add thread safety checks to async_create_task

Calling async_create_task from a thread almost always results in an
fast crash. Since most internals are using async_create_background_task
or other task APIs, and this is the one integrations seem to get wrong
the most, add a thread safety check here

* missed one

* Update homeassistant/core.py

* fix mocks

* one more internal

* more places where internal can be used

* more places where internal can be used

* more places where internal can be used

* internal one more place since this is high volume and was already eager_start
2024-04-28 18:29:00 -04:00
J. Nick KostonandGitHub b8ddf51e28 Avoid creating tasks to update universal media player (#116350)
* Avoid creating tasks to update universal media player

Nothing was being awaited in async_update. This entity has polling
disabled and there was no reason to implement manual updates since
the state is always coming from other entities

* manual update
2024-04-28 18:17:26 -04:00
J. Nick KostonandGitHub e215270c05 Remove eager_start argument from internal _async_add_hass_job function (#116310) 2024-04-28 16:30:19 -05:00
J. Nick KostonandGitHub cdfd0aa7d4 Fix incorrect call to async_schedule_update_ha_state in manual_mqtt (#116348) 2024-04-28 12:55:28 -05:00
J. Nick KostonandGitHub 66a9430410 Fix incorrect call to async_schedule_update_ha_state in generic_hygrostat (#116349) 2024-04-28 12:55:17 -05:00
J. Nick KostonandGitHub 48d620ce94 Fix another case of homeassistant_alerts delaying shutdown (#116352) 2024-04-28 12:54:53 -05:00
J. Nick KostonandGitHub ab2ea6100c Speed up singleton decorator so it can be used more places (#116292) 2024-04-28 12:11:08 -05:00
epenetandGitHub 48b1678075 Add test helper to remove device (#116234)
* Add test helper to remove device

* Rename

* Fix signature
2024-04-28 18:50:15 +02:00
J. Nick KostonandGitHub 3bcce2197c Fix incorrect call to async_schedule_update_ha_state in command_line switch (#116347) 2024-04-28 18:36:01 +02:00
J. Nick KostonandGitHub 9ca1d204b6 Fix shelly delaying shutdown (#116346) 2024-04-28 11:19:38 -05:00
J. Nick KostonandGitHub 62ab67376f Fix bond update delaying shutdown when push updated are not available (#116344)
If push updates are not available, bond could delay shutdown. The update
task should have been marked as a background task
2024-04-28 17:57:08 +02:00
J. Nick KostonandGitHub ddf58b6905 Fix homeassistant_alerts delaying shutdown (#116340) 2024-04-28 10:36:03 -05:00
Joost LekkerkerkerandGitHub 7a4aa3c40c Fix Netatmo indoor sensor (#116342)
* Debug netatmo indoor sensor

* Debug netatmo indoor sensor

* Fix
2024-04-28 17:34:27 +02:00
Jan BouwhuisandGitHub 986df70fe3 Refactor group setup (#116317)
* Refactor group setup

* Add @callback decorator and remove commented out code

* Keep set, add default on state
2024-04-28 16:32:17 +02:00
J. Nick KostonandGitHub ad0aabe9a1 Fix some flapping sonos tests (#116343) 2024-04-28 09:21:32 -05:00
J. Nick KostonandGitHub 6ccb165d8e Fix bluetooth adapter discovery delaying startup and shutdown (#116335) 2024-04-28 08:57:31 -05:00
J. Nick KostonandGitHub bf91ab6e2b Fix sonos events delaying shutdown (#116337) 2024-04-28 08:54:34 -05:00
J. Nick KostonandGitHub c3aa238a33 Fix wemo push updates delaying shutdown (#116333) 2024-04-28 08:14:45 -05:00
J. Nick KostonandGitHub 006040270c Fix august delaying shutdown (#116329) 2024-04-28 08:14:30 -05:00
J. Nick KostonandGitHub 66e86170b1 Make storage load tasks background tasks to avoid delaying shutdown (#116332) 2024-04-28 08:14:15 -05:00