1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-28 22:06:25 +00:00
Commit Graph

77403 Commits

Author SHA1 Message Date
J. Nick Koston
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 Koston
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 Koston
e215270c05 Remove eager_start argument from internal _async_add_hass_job function (#116310) 2024-04-28 16:30:19 -05:00
J. Nick Koston
cdfd0aa7d4 Fix incorrect call to async_schedule_update_ha_state in manual_mqtt (#116348) 2024-04-28 12:55:28 -05:00
J. Nick Koston
66a9430410 Fix incorrect call to async_schedule_update_ha_state in generic_hygrostat (#116349) 2024-04-28 12:55:17 -05:00
J. Nick Koston
48d620ce94 Fix another case of homeassistant_alerts delaying shutdown (#116352) 2024-04-28 12:54:53 -05:00
J. Nick Koston
ab2ea6100c Speed up singleton decorator so it can be used more places (#116292) 2024-04-28 12:11:08 -05:00
epenet
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 Koston
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 Koston
9ca1d204b6 Fix shelly delaying shutdown (#116346) 2024-04-28 11:19:38 -05:00
J. Nick Koston
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 Koston
ddf58b6905 Fix homeassistant_alerts delaying shutdown (#116340) 2024-04-28 10:36:03 -05:00
Joost Lekkerkerker
7a4aa3c40c Fix Netatmo indoor sensor (#116342)
* Debug netatmo indoor sensor

* Debug netatmo indoor sensor

* Fix
2024-04-28 17:34:27 +02:00
Jan Bouwhuis
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 Koston
ad0aabe9a1 Fix some flapping sonos tests (#116343) 2024-04-28 09:21:32 -05:00
J. Nick Koston
6ccb165d8e Fix bluetooth adapter discovery delaying startup and shutdown (#116335) 2024-04-28 08:57:31 -05:00
J. Nick Koston
bf91ab6e2b Fix sonos events delaying shutdown (#116337) 2024-04-28 08:54:34 -05:00
J. Nick Koston
c3aa238a33 Fix wemo push updates delaying shutdown (#116333) 2024-04-28 08:14:45 -05:00
J. Nick Koston
006040270c Fix august delaying shutdown (#116329) 2024-04-28 08:14:30 -05:00
J. Nick Koston
66e86170b1 Make storage load tasks background tasks to avoid delaying shutdown (#116332) 2024-04-28 08:14:15 -05:00
J. Nick Koston
ce42ad187c Fix unifiprotect delaying shutdown if websocket if offline (#116331) 2024-04-28 08:14:04 -05:00
J. Nick Koston
3f0c0a72db Prevent setup retry from delaying shutdown (#116328) 2024-04-28 08:13:51 -05:00
J. Nick Koston
76639252c9 Make discovery flow tasks background tasks (#116327) 2024-04-28 08:13:37 -05:00
J. Nick Koston
5d59b4cddd Remove unneeded TYPE_CHECKING guard in core async_set (#116311) 2024-04-27 19:34:17 -05:00
Jan Bouwhuis
43dc5415de Fix no will published when mqtt is down (#116319) 2024-04-27 18:42:38 -05:00
J. Nick Koston
50405fae5f Add a cache to _verify_event_type_length_or_raise (#116312)
Most of the time the events being fired are the same so we can
skip the python code in this function
2024-04-27 18:42:29 -05:00
IceBotYT
9fb01f3956 Convert Linear to use a base entity (#116133)
* Convert Linear to use a base entity

* Convert Linear to use a base entity

* Remove str cast in coordinator

* More minor fixes
2024-04-27 23:11:52 +02:00
wittypluck
3fd863bd7c Unifi: enable statistics for PoE port power sensor (#116308)
Add SensorStateClass.MEASUREMENT to PoE port power sensor
2024-04-27 22:21:08 +02:00
J. Nick Koston
cf682c0c44 Use more shorthand attrs in emonitor (#116307) 2024-04-27 14:24:02 -05:00
David Knowles
83b5ecb36f Increase the Hydrawise refresh frequency from 120s to 30s (#116298) 2024-04-27 20:46:58 +02:00
J. Nick Koston
cbcfd71f3d Reduce number of time calls needed to write state (#116297) 2024-04-27 13:17:31 -05:00
J. Nick Koston
f295172d07 Add a fast path for _stringify_state when state is already a str (#116295) 2024-04-27 10:48:17 -05:00
J. Nick Koston
eea66921bb Avoid update call in entity state write if there is no customize data (#116296) 2024-04-27 10:48:05 -05:00
Erik Montnemery
b94b93cc63 Make freezegun find event.time_tracker_utcnow (#116284) 2024-04-27 07:08:56 -05:00
J. Nick Koston
7715bee6b0 Fix script in restart mode that is fired from the same trigger (#116247) 2024-04-27 07:08:29 -05:00
hopkins-tk
a37d274b37 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-27 10:02:52 +02:00
Paulus Schoutsen
9819cdfec2 Bump version to 2024.5.0b1 2024.5.0b1 2024-04-27 07:27:57 +00:00
Raman Gupta
3c48c41734 Bump zwave-js-server-python to 0.55.4 (#116278) 2024-04-27 07:27:50 +00:00
J. Nick Koston
46dff86d1a Move thread safety check in area_registry sooner (#116265)
It turns out we have custom components that are writing to the area registry using the async APIs from threads. We now catch it at the point async_fire is called. Instead we should check sooner and use async_fire_internal so we catch the unsafe operation before it can corrupt the registry.
2024-04-27 07:27:49 +00:00
J. Nick Koston
85baa2508d Move thread safety check in device_registry sooner (#116264)
It turns out we have custom components that are writing to the device registry using the async APIs from threads. We now catch it at the point async_fire is called. Instead we should check sooner and use async_fire_internal so we catch the unsafe operation before it can corrupt the registry.
2024-04-27 07:27:49 +00:00
J. Nick Koston
8d11a9f21a Move thread safety check in entity_registry sooner (#116263)
* Move thread safety check in entity_registry sooner

It turns out we have a lot of custom components that are writing
to the entity registry using the async APIs from threads. We now
catch it at the point async_fire is called. Instread we should check
sooner and use async_fire_internal so we catch the unsafe operation
before it can corrupt the registry.

* coverage

* Apply suggestions from code review
2024-04-27 07:27:48 +00:00
Paul Bottein
603f46184c Update frontend to 20240426.0 (#116230) 2024-04-27 07:27:47 +00:00
Aidan Timson
e9c4185cf6 Fix state classes for ovo energy sensors (#116225)
* Fix state classes for ovo energy sensors

* Restore monetary values

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

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-04-27 07:27:47 +00:00
Robert Resch
2861ac4ac9 Use None as default value for strict connection cloud store (#116219) 2024-04-27 07:27:46 +00:00
Erik Montnemery
5fb08e8b25 Restore default timezone after electric_kiwi sensor tests (#116217) 2024-04-27 07:27:45 +00:00
Brett Adams
8f02ed4bf3 Breakfix to handle null value in Teslemetry (#116206)
* Fixes

* Remove unused test
2024-04-27 07:27:44 +00:00
Erik Montnemery
1be5249269 Reduce scope of bootstrap test fixture to module (#116195) 2024-04-27 07:27:43 +00:00
J. Nick Koston
9f84c38f08 Bump bluetooth-auto-recovery to 1.4.2 (#116192) 2024-04-27 07:27:42 +00:00
Erik Montnemery
a9b9d7f566 Fix flaky traccar_server tests (#116191) 2024-04-27 07:27:42 +00:00
J. Nick Koston
63ef52a312 Fix smartthings doing I/O in the event loop to import platforms (#116190) 2024-04-27 07:27:41 +00:00