Add new Binary Sensor description to Overkiz integration (#64322)
This commit is contained in:
parent
f0fdd7d650
commit
8f6884ac10
1 changed files with 11 additions and 0 deletions
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from typing import cast
|
||||
|
||||
from pyoverkiz.enums import OverkizCommandParam, OverkizState
|
||||
from pyoverkiz.types import StateType as OverkizStateType
|
||||
|
@ -100,6 +101,16 @@ BINARY_SENSOR_DESCRIPTIONS: list[OverkizBinarySensorDescription] = [
|
|||
device_class=BinarySensorDeviceClass.VIBRATION,
|
||||
value_fn=lambda state: state == OverkizCommandParam.DETECTED,
|
||||
),
|
||||
# DomesticHotWaterProduction/WaterHeatingSystem
|
||||
OverkizBinarySensorDescription(
|
||||
key=OverkizState.IO_OPERATING_MODE_CAPABILITIES,
|
||||
name="Energy Demand Status",
|
||||
device_class=BinarySensorDeviceClass.HEAT,
|
||||
value_fn=lambda state: cast(dict, state).get(
|
||||
OverkizCommandParam.ENERGY_DEMAND_STATUS
|
||||
)
|
||||
== 1,
|
||||
),
|
||||
]
|
||||
|
||||
SUPPORTED_STATES = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue