mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Clean up common modules in Husqvarna Automower (#132290)
This commit is contained in:
parent
80ad154dcd
commit
de0ffea52d
@ -67,7 +67,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: AutomowerConfigEntry) ->
|
||||
# without the scope. So only polling would be possible.
|
||||
raise ConfigEntryAuthFailed
|
||||
|
||||
coordinator = AutomowerDataUpdateCoordinator(hass, automower_api, entry)
|
||||
coordinator = AutomowerDataUpdateCoordinator(hass, automower_api)
|
||||
await coordinator.async_config_entry_first_refresh()
|
||||
available_devices = list(coordinator.data)
|
||||
cleanup_removed_devices(hass, coordinator.config_entry, available_devices)
|
||||
|
@ -31,9 +31,7 @@ class AutomowerDataUpdateCoordinator(DataUpdateCoordinator[dict[str, MowerAttrib
|
||||
|
||||
config_entry: ConfigEntry
|
||||
|
||||
def __init__(
|
||||
self, hass: HomeAssistant, api: AutomowerSession, entry: ConfigEntry
|
||||
) -> None:
|
||||
def __init__(self, hass: HomeAssistant, api: AutomowerSession) -> None:
|
||||
"""Initialize data updater."""
|
||||
super().__init__(
|
||||
hass,
|
||||
|
@ -133,7 +133,7 @@ class AutomowerControlEntity(AutomowerAvailableEntity):
|
||||
|
||||
|
||||
class WorkAreaAvailableEntity(AutomowerAvailableEntity):
|
||||
"""Base entity for work work areas."""
|
||||
"""Base entity for work areas."""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@ -164,4 +164,4 @@ class WorkAreaAvailableEntity(AutomowerAvailableEntity):
|
||||
|
||||
|
||||
class WorkAreaControlEntity(WorkAreaAvailableEntity, AutomowerControlEntity):
|
||||
"""Base entity work work areas with control function."""
|
||||
"""Base entity for work areas with control function."""
|
||||
|
@ -18,11 +18,7 @@ rules:
|
||||
status: done
|
||||
comment: |
|
||||
The integration only has an entity service, registered in the platform.
|
||||
common-modules:
|
||||
status: todo
|
||||
comment: |
|
||||
Remove unused config_entry in coordinator.
|
||||
Fix typos in entity.py
|
||||
common-modules: done
|
||||
docs-high-level-description: done
|
||||
docs-installation-instructions: done
|
||||
docs-removal-instructions: done
|
||||
|
Loading…
x
Reference in New Issue
Block a user