mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Explicitly pass in the config_entry in fully_kiosk coordinator (#137827)
explicitly pass in the config_entry in coordinator
This commit is contained in:
parent
bc07598f47
commit
1179278d50
@ -1,17 +1,14 @@
|
||||
"""The Fully Kiosk Browser integration."""
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.typing import ConfigType
|
||||
|
||||
from .const import DOMAIN
|
||||
from .coordinator import FullyKioskDataUpdateCoordinator
|
||||
from .coordinator import FullyKioskConfigEntry, FullyKioskDataUpdateCoordinator
|
||||
from .services import async_setup_services
|
||||
|
||||
type FullyKioskConfigEntry = ConfigEntry[FullyKioskDataUpdateCoordinator]
|
||||
|
||||
PLATFORMS = [
|
||||
Platform.BINARY_SENSOR,
|
||||
Platform.BUTTON,
|
||||
|
@ -14,11 +14,15 @@ from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, Upda
|
||||
|
||||
from .const import DEFAULT_PORT, LOGGER, UPDATE_INTERVAL
|
||||
|
||||
type FullyKioskConfigEntry = ConfigEntry[FullyKioskDataUpdateCoordinator]
|
||||
|
||||
|
||||
class FullyKioskDataUpdateCoordinator(DataUpdateCoordinator):
|
||||
"""Define an object to hold Fully Kiosk Browser data."""
|
||||
|
||||
def __init__(self, hass: HomeAssistant, entry: ConfigEntry) -> None:
|
||||
config_entry: FullyKioskConfigEntry
|
||||
|
||||
def __init__(self, hass: HomeAssistant, entry: FullyKioskConfigEntry) -> None:
|
||||
"""Initialize."""
|
||||
self.use_ssl = entry.data.get(CONF_SSL, False)
|
||||
self.fully = FullyKiosk(
|
||||
@ -32,6 +36,7 @@ class FullyKioskDataUpdateCoordinator(DataUpdateCoordinator):
|
||||
super().__init__(
|
||||
hass,
|
||||
LOGGER,
|
||||
config_entry=entry,
|
||||
name=entry.data[CONF_HOST],
|
||||
update_interval=UPDATE_INTERVAL,
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user