Clean up common modules in Husqvarna Automower (#132290)

This commit is contained in:
Thomas55555 2024-12-04 20:28:43 +01:00 committed by GitHub
parent 80ad154dcd
commit de0ffea52d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 11 deletions

View File

@ -67,7 +67,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: AutomowerConfigEntry) ->
# without the scope. So only polling would be possible. # without the scope. So only polling would be possible.
raise ConfigEntryAuthFailed raise ConfigEntryAuthFailed
coordinator = AutomowerDataUpdateCoordinator(hass, automower_api, entry) coordinator = AutomowerDataUpdateCoordinator(hass, automower_api)
await coordinator.async_config_entry_first_refresh() await coordinator.async_config_entry_first_refresh()
available_devices = list(coordinator.data) available_devices = list(coordinator.data)
cleanup_removed_devices(hass, coordinator.config_entry, available_devices) cleanup_removed_devices(hass, coordinator.config_entry, available_devices)

View File

@ -31,9 +31,7 @@ class AutomowerDataUpdateCoordinator(DataUpdateCoordinator[dict[str, MowerAttrib
config_entry: ConfigEntry config_entry: ConfigEntry
def __init__( def __init__(self, hass: HomeAssistant, api: AutomowerSession) -> None:
self, hass: HomeAssistant, api: AutomowerSession, entry: ConfigEntry
) -> None:
"""Initialize data updater.""" """Initialize data updater."""
super().__init__( super().__init__(
hass, hass,

View File

@ -133,7 +133,7 @@ class AutomowerControlEntity(AutomowerAvailableEntity):
class WorkAreaAvailableEntity(AutomowerAvailableEntity): class WorkAreaAvailableEntity(AutomowerAvailableEntity):
"""Base entity for work work areas.""" """Base entity for work areas."""
def __init__( def __init__(
self, self,
@ -164,4 +164,4 @@ class WorkAreaAvailableEntity(AutomowerAvailableEntity):
class WorkAreaControlEntity(WorkAreaAvailableEntity, AutomowerControlEntity): class WorkAreaControlEntity(WorkAreaAvailableEntity, AutomowerControlEntity):
"""Base entity work work areas with control function.""" """Base entity for work areas with control function."""

View File

@ -18,11 +18,7 @@ rules:
status: done status: done
comment: | comment: |
The integration only has an entity service, registered in the platform. The integration only has an entity service, registered in the platform.
common-modules: common-modules: done
status: todo
comment: |
Remove unused config_entry in coordinator.
Fix typos in entity.py
docs-high-level-description: done docs-high-level-description: done
docs-installation-instructions: done docs-installation-instructions: done
docs-removal-instructions: done docs-removal-instructions: done