Remove unneeded type for enphase_envoy coordinator in async_unload_entry (#133817)

This commit is contained in:
Arie Catsman 2024-12-22 19:26:35 +01:00 committed by GitHub
parent a2aba77973
commit c6789d70a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 6 deletions

View File

@ -77,7 +77,7 @@ async def async_reload_entry(hass: HomeAssistant, entry: ConfigEntry) -> None:
async def async_unload_entry(hass: HomeAssistant, entry: EnphaseConfigEntry) -> bool:
"""Unload a config entry."""
coordinator: EnphaseUpdateCoordinator = entry.runtime_data
coordinator = entry.runtime_data
coordinator.async_cancel_token_refresh()
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)

View File

@ -35,11 +35,7 @@ rules:
comment: no events used.
entity-unique-id: done
has-entity-name: done
runtime-data:
status: done
comment: |
async_unload_entry- coordinator: EnphaseUpdateCoordinator = entry.runtime_data
You can remove the EnphaseUpdateCoordinator as the type can now be inferred thanks to the typed config entry
runtime-data: done
test-before-configure: done
test-before-setup: done
unique-config-entry: done