From 6c7c090d5d9a37c49c3c6ef6a883311d2abb3df8 Mon Sep 17 00:00:00 2001 From: dynasticorpheus Date: Thu, 1 Feb 2024 10:36:23 +0100 Subject: [PATCH 1/2] Add TURN_ON/OFF ClimateEntityFeature for remeha_home --- custom_components/remeha_home/climate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/remeha_home/climate.py b/custom_components/remeha_home/climate.py index feb1def..7d99123 100644 --- a/custom_components/remeha_home/climate.py +++ b/custom_components/remeha_home/climate.py @@ -75,8 +75,12 @@ async def async_setup_entry( class RemehaHomeClimateEntity(CoordinatorEntity, ClimateEntity): """Climate entity representing a Remeha Home climate zone.""" + _enable_turn_on_off_backwards_compatibility = False _attr_supported_features = ( - ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE + ClimateEntityFeature.TARGET_TEMPERATURE + | ClimateEntityFeature.PRESET_MODE + | ClimateEntityFeature.TURN_OFF + | ClimateEntityFeature.TURN_ON ) _attr_temperature_unit = UnitOfTemperature.CELSIUS _attr_precision = PRECISION_HALVES From fb62fe86ca7029496d8ca08ca50d882b4e42ae41 Mon Sep 17 00:00:00 2001 From: dynasticorpheus Date: Mon, 6 May 2024 07:02:58 +0200 Subject: [PATCH 2/2] Deprecate old backports and typing alias --- custom_components/remeha_home/coordinator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/remeha_home/coordinator.py b/custom_components/remeha_home/coordinator.py index f26ca58..c6bb0f8 100644 --- a/custom_components/remeha_home/coordinator.py +++ b/custom_components/remeha_home/coordinator.py @@ -5,8 +5,8 @@ import async_timeout from aiohttp.client_exceptions import ClientResponseError +from homeassistant.core import HomeAssistant from homeassistant.helpers.entity import DeviceInfo -from homeassistant.helpers.typing import HomeAssistantType from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from homeassistant.exceptions import ConfigEntryAuthFailed @@ -19,7 +19,7 @@ class RemehaHomeUpdateCoordinator(DataUpdateCoordinator): """Remeha Home update coordinator.""" - def __init__(self, hass: HomeAssistantType, api: RemehaHomeAPI) -> None: + def __init__(self, hass: HomeAssistant, api: RemehaHomeAPI) -> None: """Initialize Remeha Home update coordinator.""" super().__init__( hass,