mirror of
https://github.com/home-assistant/core.git
synced 2025-04-27 10:47:51 +00:00
Add new Binary Sensor description to Overkiz integration (#64322)
This commit is contained in:
parent
f0fdd7d650
commit
8f6884ac10
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
from typing import cast
|
||||||
|
|
||||||
from pyoverkiz.enums import OverkizCommandParam, OverkizState
|
from pyoverkiz.enums import OverkizCommandParam, OverkizState
|
||||||
from pyoverkiz.types import StateType as OverkizStateType
|
from pyoverkiz.types import StateType as OverkizStateType
|
||||||
@ -100,6 +101,16 @@ BINARY_SENSOR_DESCRIPTIONS: list[OverkizBinarySensorDescription] = [
|
|||||||
device_class=BinarySensorDeviceClass.VIBRATION,
|
device_class=BinarySensorDeviceClass.VIBRATION,
|
||||||
value_fn=lambda state: state == OverkizCommandParam.DETECTED,
|
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 = {
|
SUPPORTED_STATES = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user