mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 08:07:45 +00:00
Remove not used config entry update listener from nut (#149096)
This commit is contained in:
parent
b262a5c9b6
commit
5d653d46c3
@ -116,7 +116,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: NutConfigEntry) -> bool:
|
|||||||
|
|
||||||
_LOGGER.debug("NUT Sensors Available: %s", status if status else None)
|
_LOGGER.debug("NUT Sensors Available: %s", status if status else None)
|
||||||
|
|
||||||
entry.async_on_unload(entry.add_update_listener(_async_update_listener))
|
|
||||||
unique_id = _unique_id_from_status(status)
|
unique_id = _unique_id_from_status(status)
|
||||||
if unique_id is None:
|
if unique_id is None:
|
||||||
unique_id = entry.entry_id
|
unique_id = entry.entry_id
|
||||||
@ -199,11 +198,6 @@ async def async_remove_config_entry_device(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def _async_update_listener(hass: HomeAssistant, entry: NutConfigEntry) -> None:
|
|
||||||
"""Handle options update."""
|
|
||||||
await hass.config_entries.async_reload(entry.entry_id)
|
|
||||||
|
|
||||||
|
|
||||||
def _manufacturer_from_status(status: dict[str, str]) -> str | None:
|
def _manufacturer_from_status(status: dict[str, str]) -> str | None:
|
||||||
"""Find the best manufacturer value from the status."""
|
"""Find the best manufacturer value from the status."""
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user