Add diagnostics platform to Fastdotcom (#111525)

This commit is contained in:
Erwin Douna 2024-03-15 14:42:07 +01:00 committed by GitHub
parent 4b4258881b
commit 1ff049cc66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 83 additions and 12 deletions

View file

@ -8,14 +8,14 @@ from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import issue_registry as ir
from .const import DOMAIN, SERVICE_NAME
from .coordinator import FastdotcomDataUpdateCoordindator
from .coordinator import FastdotcomDataUpdateCoordinator
def async_setup_services(hass: HomeAssistant) -> None:
"""Set up the service for the Fastdotcom integration."""
@callback
def collect_coordinator() -> FastdotcomDataUpdateCoordindator:
def collect_coordinator() -> FastdotcomDataUpdateCoordinator:
"""Collect the coordinator Fastdotcom."""
config_entries = hass.config_entries.async_entries(DOMAIN)
if not config_entries:
@ -24,7 +24,7 @@ def async_setup_services(hass: HomeAssistant) -> None:
for config_entry in config_entries:
if config_entry.state != ConfigEntryState.LOADED:
raise HomeAssistantError(f"{config_entry.title} is not loaded")
coordinator: FastdotcomDataUpdateCoordindator = hass.data[DOMAIN][
coordinator: FastdotcomDataUpdateCoordinator = hass.data[DOMAIN][
config_entry.entry_id
]
break