Skip to content

Commit

Permalink
Revert "fix deprecated entry setup and destruction."
Browse files Browse the repository at this point in the history
This reverts commit 6c34e5a.
  • Loading branch information
gluap committed Jul 7, 2024
1 parent 6c34e5a commit 4a844ea
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions custom_components/duofern/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
unsetupDevice(hass, duofernId)

for component in DUOFERN_COMPONENTS:
await hass.config_entries.async_forward_entry_unload(config_entry, component)

hass.async_create_task(
hass.config_entries.async_forward_entry_unload(config_entry, component)
)


newstick = DuofernStickThreaded(serial_port=stick.port, system_code=stick.system_code,
Expand Down Expand Up @@ -131,7 +132,9 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Setup the Duofern Config entries (entities, devices, etc...)"""
for component in DUOFERN_COMPONENTS:
await hass.config_entries.async_forward_entry_setup(entry, component)
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(entry, component)
)

return True

Expand Down

0 comments on commit 4a844ea

Please sign in to comment.