Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kukulich committed Jun 1, 2024
1 parent a7e1fcd commit 5dc7d3e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion custom_components/jablotron100/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: JablotronConfigE


async def options_update_listener(hass: HomeAssistant, config_entry: JablotronConfigEntry) -> None:
await config_entry.runtime_data.update_options(config_entry.options)
await hass.config_entries.async_reload(config_entry.entry_id)
4 changes: 0 additions & 4 deletions custom_components/jablotron100/jablotron.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,6 @@ def __init__(self, hass: core.HomeAssistant, config_entry_id: str, config: Dict[
def signal_entities_added(self) -> str:
return "{}_{}_entities_added".format(DOMAIN, self._config_entry_id)

async def update_options(self, options: Dict[str, Any]) -> None:
self._options = options
self._update_all_hass_entities()

def is_code_required_for_disarm(self) -> bool:
return self._options.get(CONF_REQUIRE_CODE_TO_DISARM, DEFAULT_CONF_REQUIRE_CODE_TO_DISARM)

Expand Down

0 comments on commit 5dc7d3e

Please sign in to comment.