Migrate Airtouch4 to runtime_data (#119493)
This commit is contained in:
parent
99b349fa2c
commit
420ee782ff
2 changed files with 9 additions and 14 deletions
|
@ -16,13 +16,13 @@ from homeassistant.components.climate import (
|
|||
ClimateEntityFeature,
|
||||
HVACMode,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.device_registry import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||
|
||||
from . import AirTouch4ConfigEntry
|
||||
from .const import DOMAIN
|
||||
|
||||
AT_TO_HA_STATE = {
|
||||
|
@ -63,11 +63,11 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
config_entry: AirTouch4ConfigEntry,
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up the Airtouch 4."""
|
||||
coordinator = hass.data[DOMAIN][config_entry.entry_id]
|
||||
coordinator = config_entry.runtime_data
|
||||
info = coordinator.data
|
||||
entities: list[ClimateEntity] = [
|
||||
AirtouchGroup(coordinator, group["group_number"], info)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue