hass-core/homeassistant/components/esphome
J. Nick Koston ed0568c655
Ensure config entries are not unloaded while their platforms are setting up (#118767)
* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* run with error on to find them

* cert_exp, hold lock

* cert_exp, hold lock

* shelly async_late_forward_entry_setups

* compact

* compact

* found another

* patch up mobileapp

* patch up hue tests

* patch up smartthings

* fix mqtt

* fix esphome

* zwave_js

* mqtt

* rework

* fixes

* fix mocking

* fix mocking

* do not call async_forward_entry_setup directly

* docstrings

* docstrings

* docstrings

* add comments

* doc strings

* fixed all in core, turn off strict

* coverage

* coverage

* missing

* coverage
2024-06-04 21:34:39 -04:00
..
__init__.py Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
alarm_control_panel.py Bump ruff to 0.3.4 (#112690) 2024-03-26 00:02:16 +01:00
binary_sensor.py Send/receive Voice Assistant audio via ESPHome native API (#114800) 2024-04-09 10:55:59 -04:00
bluetooth.py Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
button.py ESPHome: Catch and re-raise client library errors as HomeAssistantErrors (#113026) 2024-03-12 18:06:25 -10:00
camera.py Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
climate.py ESPHome: Catch and re-raise client library errors as HomeAssistantErrors (#113026) 2024-03-12 18:06:25 -10:00
config_flow.py Add ESPhome discovery via MQTT (#116499) 2024-05-10 13:32:42 +02:00
const.py Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
coordinator.py Move esphome coordinator to separate module (#117427) 2024-05-14 15:16:47 +02:00
cover.py ESPHome: Catch and re-raise client library errors as HomeAssistantErrors (#113026) 2024-03-12 18:06:25 -10:00
dashboard.py Move esphome coordinator to separate module (#117427) 2024-05-14 15:16:47 +02:00
date.py Update empty line formatting after module docstring (#114040) 2024-03-23 00:27:57 +01:00
datetime.py ESPHome: Add datetime entities (#115942) 2024-04-22 13:12:22 +02:00
diagnostics.py Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
domain_data.py Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
entity.py Replace pylint protected-access with Ruff SLF001 (#115735) 2024-05-06 20:33:26 +02:00
entry_data.py Ensure config entries are not unloaded while their platforms are setting up (#118767) 2024-06-04 21:34:39 -04:00
enum_mapper.py Use PEP 695 for class annotations (1) (#117775) 2024-05-20 10:42:57 +02:00
event.py Add Event support to ESPHome components (#116061) 2024-04-24 13:22:03 +12:00
fan.py ESPHome: Catch and re-raise client library errors as HomeAssistantErrors (#113026) 2024-03-12 18:06:25 -10:00
light.py ESPHome: Catch and re-raise client library errors as HomeAssistantErrors (#113026) 2024-03-12 18:06:25 -10:00
lock.py ESPHome: Catch and re-raise client library errors as HomeAssistantErrors (#113026) 2024-03-12 18:06:25 -10:00
manager.py Ensure config entries are not unloaded while their platforms are setting up (#118767) 2024-06-04 21:34:39 -04:00
manifest.json [esphome] Assist timers (#118275) 2024-05-28 14:57:58 -04:00
media_player.py Send MEDIA_ANNOUNCE flag to ESPHome media_player (#116993) 2024-05-23 09:47:34 +12:00
number.py ESPHome: Catch and re-raise client library errors as HomeAssistantErrors (#113026) 2024-03-12 18:06:25 -10:00
select.py Send/receive Voice Assistant audio via ESPHome native API (#114800) 2024-04-09 10:55:59 -04:00
sensor.py Bump ruff to 0.3.4 (#112690) 2024-03-26 00:02:16 +01:00
services.yaml
strings.json Add ESPhome discovery via MQTT (#116499) 2024-05-10 13:32:42 +02:00
switch.py ESPHome: Catch and re-raise client library errors as HomeAssistantErrors (#113026) 2024-03-12 18:06:25 -10:00
text.py ESPHome: Catch and re-raise client library errors as HomeAssistantErrors (#113026) 2024-03-12 18:06:25 -10:00
time.py Update empty line formatting after module docstring (#114040) 2024-03-23 00:27:57 +01:00
update.py Move esphome coordinator to separate module (#117427) 2024-05-14 15:16:47 +02:00
valve.py Add valve entity support for ESPHome (#115341) 2024-04-17 20:47:15 -05:00
voice_assistant.py [esphome] 100% voice assistant test coverage (#118334) 2024-05-28 21:14:47 -04:00