homeassistant/components/geniushub/climate.py
async def async_setup_platform(
    hass: HomeAssistantType, config: ConfigType, async_add_entities, discovery_info=None
) -> None:
    """Set up the Genius Hub climate entities."""
    if discovery_info is None:
        return

    broker = hass.data[DOMAIN]["broker"]

    async_add_entities(
        [
            GeniusClimateZone(broker, z)
            for z in broker.client.zone_objs
            if z.data["type"] in GH_ZONES
        ]
    )

    # Register custom services
    platform = entity_platform.current_platform.get()

    platform.async_register_entity_service(
        SVC_SET_ZONE_MODE,
        SET_ZONE_MODE_SCHEMA,
        "async_set_zone",
    )

    platform.async_register_entity_service(
        SVC_SET_ZONE_OVERRIDE,
        SET_ZONE_OVERRIDE_SCHEMA,
        "async_set_temperature",
    )
Set up the Genius Hub climate entities.
Set up the Genius Hub climate entities.
Set up the Genius Hub climate entities .
async def async_setup_platform(
    hass: HomeAssistantType, config: ConfigType, async_add_entities, discovery_info=None
) -> None:
    if discovery_info is None:
        return
    broker = hass.data[DOMAIN]["broker"]
    async_add_entities(
        [
            GeniusClimateZone(broker, z)
            for z in broker.client.zone_objs
            if z.data["type"] in GH_ZONES
        ]
    )
    platform = entity_platform.current_platform.get()
    platform.async_register_entity_service(
        SVC_SET_ZONE_MODE,
        SET_ZONE_MODE_SCHEMA,
        "async_set_zone",
    )
    platform.async_register_entity_service(
        SVC_SET_ZONE_OVERRIDE,
        SET_ZONE_OVERRIDE_SCHEMA,
        "async_set_temperature",
    )
async def async_setup_platform ( hass : HomeAssistantType , config : ConfigType , async_add_entities , discovery_info = None ) -> None : if discovery_info is None : return broker = hass . data [ DOMAIN ] [ "broker" ] async_add_entities ( [ GeniusClimateZone ( broker , z ) for z in broker . client . zone_objs if z . data [ "type" ] in GH_ZONES ] ) platform = entity_platform . current_platform . get ( ) platform . async_register_entity_service ( SVC_SET_ZONE_MODE , SET_ZONE_MODE_SCHEMA , "async_set_zone" , ) platform . async_register_entity_service ( SVC_SET_ZONE_OVERRIDE , SET_ZONE_OVERRIDE_SCHEMA , "async_set_temperature" , )
Set up the Genius Hub climate entities.
Set up the Genius Hub climate entities .
"""Set up the Genius Hub climate entities.""" # Register custom services
hass
HomeAssistantType
config
ConfigType
async_add_entities
discovery_info