Skip to content

Commit

Permalink
Fix integration reload
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Apr 8, 2024
1 parent efb00a2 commit 253322c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 2 additions & 3 deletions custom_components/gyverlamp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
return True


async def async_update_options(hass: HomeAssistant, entry: ConfigEntry):
# update entity config
hass.data[DOMAIN][entry.entry_id].update_config(entry.options)
async def async_update_options(hass: HomeAssistant, config_entry: ConfigEntry):
await hass.config_entries.async_reload(config_entry.entry_id)


async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry):
Expand Down
5 changes: 0 additions & 5 deletions custom_components/gyverlamp/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ async def async_setup_entry(
hass.data[DOMAIN][entry.entry_id] = entity


async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry):
hass.data[DOMAIN].pop(entry.entry_id)
return True


class GyverLamp(LightEntity):
def __init__(self, config: dict, unique_id=None):
self._attr_effect_list = config.get(CONF_EFFECTS, EFFECTS)
Expand Down

0 comments on commit 253322c

Please # to comment.