From 30528e0de0b6df017e0fdce2643e997a866c9875 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Tue, 15 Feb 2022 12:24:33 -0800 Subject: [PATCH] Add extra entity descriptions to Overkiz integration (#66093) --- homeassistant/components/overkiz/number.py | 28 ++++++++++++++++++++++ homeassistant/components/overkiz/select.py | 11 +++++++++ homeassistant/components/overkiz/sensor.py | 7 ++++++ 3 files changed, 46 insertions(+) diff --git a/homeassistant/components/overkiz/number.py b/homeassistant/components/overkiz/number.py index d0543eefd5e49a..40d04b9bf71a43 100644 --- a/homeassistant/components/overkiz/number.py +++ b/homeassistant/components/overkiz/number.py @@ -48,6 +48,34 @@ class OverkizNumberDescription(NumberEntityDescription, OverkizNumberDescription max_value=4, entity_category=EntityCategory.CONFIG, ), + # SomfyHeatingTemperatureInterface + OverkizNumberDescription( + key=OverkizState.CORE_ECO_ROOM_TEMPERATURE, + name="Eco Room Temperature", + icon="mdi:thermometer", + command=OverkizCommand.SET_ECO_TEMPERATURE, + min_value=6, + max_value=29, + entity_category=EntityCategory.CONFIG, + ), + OverkizNumberDescription( + key=OverkizState.CORE_COMFORT_ROOM_TEMPERATURE, + name="Comfort Room Temperature", + icon="mdi:home-thermometer-outline", + command=OverkizCommand.SET_COMFORT_TEMPERATURE, + min_value=7, + max_value=30, + entity_category=EntityCategory.CONFIG, + ), + OverkizNumberDescription( + key=OverkizState.CORE_SECURED_POSITION_TEMPERATURE, + name="Freeze Protection Temperature", + icon="mdi:sun-thermometer-outline", + command=OverkizCommand.SET_SECURED_POSITION_TEMPERATURE, + min_value=5, + max_value=15, + entity_category=EntityCategory.CONFIG, + ), ] SUPPORTED_STATES = {description.key: description for description in NUMBER_DESCRIPTIONS} diff --git a/homeassistant/components/overkiz/select.py b/homeassistant/components/overkiz/select.py index f1e48d83469f72..c097b04d4ebde6 100644 --- a/homeassistant/components/overkiz/select.py +++ b/homeassistant/components/overkiz/select.py @@ -73,6 +73,17 @@ def _select_option_memorized_simple_volume( entity_category=EntityCategory.CONFIG, device_class=OverkizDeviceClass.MEMORIZED_SIMPLE_VOLUME, ), + # SomfyHeatingTemperatureInterface + OverkizSelectDescription( + key=OverkizState.OVP_HEATING_TEMPERATURE_INTERFACE_OPERATING_MODE, + name="Operating Mode", + icon="mdi:sun-snowflake", + options=[OverkizCommandParam.HEATING, OverkizCommandParam.COOLING], + select_option=lambda option, execute_command: execute_command( + OverkizCommand.SET_OPERATING_MODE, option + ), + entity_category=EntityCategory.CONFIG, + ), ] SUPPORTED_STATES = {description.key: description for description in SELECT_DESCRIPTIONS} diff --git a/homeassistant/components/overkiz/sensor.py b/homeassistant/components/overkiz/sensor.py index 1e5eb0881824c2..10de6f699dde01 100644 --- a/homeassistant/components/overkiz/sensor.py +++ b/homeassistant/components/overkiz/sensor.py @@ -359,6 +359,13 @@ class OverkizSensorDescription(SensorEntityDescription): key=OverkizState.IO_ELECTRIC_BOOSTER_OPERATING_TIME, name="Electric Booster Operating Time", ), + # Cover + OverkizSensorDescription( + key=OverkizState.CORE_TARGET_CLOSURE, + name="Target Closure", + native_unit_of_measurement=PERCENTAGE, + entity_registry_enabled_default=False, + ), ] SUPPORTED_STATES = {description.key: description for description in SENSOR_DESCRIPTIONS}