async def async_setup_entry(
    hass: HomeAssistant,
    entry: HomematicConfigEntry,
    async_add_entities: AddEntitiesCallback,
) -> None:
    """Set up the Homematic(IP) Local climate platform."""
    control_unit: ControlUnit = entry.runtime_data

    @callback
    def async_add_climate(data_points: tuple[BaseCustomDpClimate, ...]) -> None:
        """Add climate from Homematic(IP) Local."""
        _LOGGER.debug("ASYNC_ADD_CLIMATE: Adding %i data points", len(data_points))

        if entities := [
            HaHomematicClimate(
                control_unit=control_unit,
                data_point=data_point,
            )
            for data_point in data_points
        ]:
            async_add_entities(entities)

    entry.async_on_unload(
        func=async_dispatcher_connect(
            hass=hass,
            signal=signal_new_data_point(entry_id=entry.entry_id, platform=DataPointCategory.CLIMATE),
            target=async_add_climate,
        )
    )

    async_add_climate(data_points=control_unit.get_new_data_points(data_point_type=BaseCustomDpClimate))

    platform = entity_platform.async_get_current_platform()

    platform.async_register_entity_service(
        name=HmipLocalServices.ENABLE_AWAY_MODE_BY_CALENDAR,
        schema={
            vol.Optional(ATTR_AWAY_START): cv.datetime,
            vol.Required(ATTR_AWAY_END): cv.datetime,
            vol.Required(ATTR_AWAY_TEMPERATURE, default=18.0): vol.All(vol.Coerce(float), vol.Range(min=5.0, max=30.5)),
        },
        func="async_enable_away_mode_by_calendar",
    )
    platform.async_register_entity_service(
        name=HmipLocalServices.ENABLE_AWAY_MODE_BY_DURATION,
        schema={
            vol.Required(ATTR_AWAY_HOURS): cv.positive_int,
            vol.Required(ATTR_AWAY_TEMPERATURE, default=18.0): vol.All(vol.Coerce(float), vol.Range(min=5.0, max=30.5)),
        },
        func="async_enable_away_mode_by_duration",
    )
    platform.async_register_entity_service(
        name=HmipLocalServices.DISABLE_AWAY_MODE,
        schema={},
        func="async_disable_away_mode",
    )

    platform.async_register_entity_service(
        name=HmipLocalServices.COPY_SCHEDULE,
        schema={
            vol.Required(ATTR_SOURCE_ENTITY_ID): cv.string,
        },
        func="async_copy_schedule",
    )

    platform.async_register_entity_service(
        name=HmipLocalServices.COPY_SCHEDULE_PROFILE,
        schema={
            vol.Optional(ATTR_SOURCE_ENTITY_ID): cv.string,
            vol.Required(ATTR_SOURCE_PROFILE): cv.string,
            vol.Required(ATTR_TARGET_PROFILE): cv.string,
        },
        supports_response=SupportsResponse.OPTIONAL,
        func="async_copy_schedule_profile",
    )

    platform.async_register_entity_service(
        name=HmipLocalServices.GET_SCHEDULE_PROFILE,
        schema={
            vol.Required(ATTR_PROFILE): cv.string,
        },
        supports_response=SupportsResponse.OPTIONAL,
        func="async_get_schedule_profile",
    )

    platform.async_register_entity_service(
        name=HmipLocalServices.GET_SCHEDULE_PROFILE_WEEKDAY,
        schema={
            vol.Required(ATTR_PROFILE): cv.string,
            vol.Required(ATTR_WEEKDAY): cv.string,
        },
        supports_response=SupportsResponse.OPTIONAL,
        func="async_get_schedule_profile_weekday",
    )

    platform.async_register_entity_service(
        name=HmipLocalServices.SET_SCHEDULE_PROFILE,
        schema={
            vol.Required(ATTR_PROFILE): cv.string,
            vol.Required(ATTR_PROFILE_DATA): dict,
        },
        func="async_set_schedule_profile",
    )

    platform.async_register_entity_service(
        name=HmipLocalServices.SET_SCHEDULE_PROFILE_WEEKDAY,
        schema={
            vol.Required(ATTR_PROFILE): cv.string,
            vol.Required(ATTR_WEEKDAY): cv.string,
            vol.Required(ATTR_WEEKDAY_DATA): dict,
        },
        func="async_set_schedule_profile_weekday",
    )

    platform.async_register_entity_service(
        name=HmipLocalServices.SET_SCHEDULE_SIMPLE_PROFILE,
        schema={
            vol.Required(ATTR_PROFILE): cv.string,
            vol.Required(ATTR_BASE_TEMPERATURE): cv.positive_float,
            vol.Required(ATTR_SIMPLE_PROFILE_DATA): dict,
        },
        func="async_set_schedule_simple_profile",
    )

    platform.async_register_entity_service(
        name=HmipLocalServices.SET_SCHEDULE_SIMPLE_PROFILE_WEEKDAY,
        schema={
            vol.Required(ATTR_PROFILE): cv.string,
            vol.Required(ATTR_WEEKDAY): cv.string,
            vol.Required(ATTR_BASE_TEMPERATURE): cv.positive_float,
            vol.Required(ATTR_SIMPLE_WEEKDAY_LIST): list,
        },
        func="async_set_schedule_simple_profile_weekday",
    )
Set up the Homematic(IP) Local climate platform.
custom_components/homematicip_local/climate.py