Skip to content

Commit

Permalink
Add extra entity descriptions to Overkiz integration (home-assistant#…
Browse files Browse the repository at this point in the history
  • Loading branch information
iMicknl authored Feb 15, 2022
1 parent 9f1c58c commit 30528e0
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
28 changes: 28 additions & 0 deletions homeassistant/components/overkiz/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
11 changes: 11 additions & 0 deletions homeassistant/components/overkiz/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
7 changes: 7 additions & 0 deletions homeassistant/components/overkiz/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 30528e0

Please sign in to comment.