mirror of
https://github.com/Andre0512/hon.git
synced 2024-12-22 18:55:31 +00:00
Add oven support
This commit is contained in:
parent
135d6cafed
commit
116f9d5470
|
@ -58,6 +58,32 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = {
|
||||||
device_class=BinarySensorDeviceClass.DOOR,
|
device_class=BinarySensorDeviceClass.DOOR,
|
||||||
on_value="1",
|
on_value="1",
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
"OV": (
|
||||||
|
HonBinarySensorEntityDescription(
|
||||||
|
key="attributes.lastConnEvent.category",
|
||||||
|
name="Online",
|
||||||
|
device_class=BinarySensorDeviceClass.CONNECTIVITY,
|
||||||
|
on_value="CONNECTED",
|
||||||
|
icon="mdi:wifi"
|
||||||
|
),
|
||||||
|
|
||||||
|
HonBinarySensorEntityDescription(
|
||||||
|
key="attributes.parameters.remoteCtrValid",
|
||||||
|
name="On",
|
||||||
|
device_class=BinarySensorDeviceClass.CONNECTIVITY,
|
||||||
|
on_value="1",
|
||||||
|
icon="mdi:remote"
|
||||||
|
),
|
||||||
|
HonBinarySensorEntityDescription(
|
||||||
|
key="attributes.parameters.onOffStatus",
|
||||||
|
name="On",
|
||||||
|
device_class=BinarySensorDeviceClass.RUNNING,
|
||||||
|
on_value="1",
|
||||||
|
icon="mdi:power-cycle"
|
||||||
|
),
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,19 @@ BUTTONS: dict[str, tuple[ButtonEntityDescription, ...]] = {
|
||||||
# icon="mdi:play-pause",
|
# icon="mdi:play-pause",
|
||||||
# ),
|
# ),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
"OV":(
|
||||||
|
ButtonEntityDescription(
|
||||||
|
key="startProgram",
|
||||||
|
name="Start Program",
|
||||||
|
icon="mdi:power-cycle",
|
||||||
|
),
|
||||||
|
ButtonEntityDescription(
|
||||||
|
key="stopProgram",
|
||||||
|
name="Stop Program",
|
||||||
|
icon="mdi:power-off",
|
||||||
|
),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ from homeassistant.components.number import (
|
||||||
NumberEntityDescription,
|
NumberEntityDescription,
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import UnitOfTime
|
from homeassistant.const import UnitOfTime, UnitOfTemperature
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
from homeassistant.helpers.entity import EntityCategory
|
from homeassistant.helpers.entity import EntityCategory
|
||||||
|
|
||||||
|
@ -74,6 +74,31 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||||
entity_category=EntityCategory.CONFIG
|
entity_category=EntityCategory.CONFIG
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
"OV": (
|
||||||
|
NumberEntityDescription(
|
||||||
|
key="startProgram.delayTime",
|
||||||
|
name="Delay time",
|
||||||
|
icon="mdi:timer-plus",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
native_unit_of_measurement=UnitOfTime.MINUTES
|
||||||
|
),
|
||||||
|
NumberEntityDescription(
|
||||||
|
key="startProgram.tempSel",
|
||||||
|
name="Target Temperature",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
icon="mdi:thermometer",
|
||||||
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS
|
||||||
|
),
|
||||||
|
|
||||||
|
NumberEntityDescription(
|
||||||
|
key="startProgram.prTime",
|
||||||
|
name="Program Duration",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
icon="mdi:timelapse",
|
||||||
|
native_unit_of_measurement=UnitOfTime.MINUTES
|
||||||
|
),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,20 @@ SELECTS = {
|
||||||
icon="mdi:timer",
|
icon="mdi:timer",
|
||||||
unit_of_measurement=UnitOfTime.MINUTES
|
unit_of_measurement=UnitOfTime.MINUTES
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
"OV": (
|
||||||
|
SelectEntityDescription(
|
||||||
|
key="startProgram.program",
|
||||||
|
name="Program",
|
||||||
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
),
|
||||||
|
|
||||||
|
SelectEntityDescription(
|
||||||
|
key="startProgram.preheatStatus",
|
||||||
|
name="Preheat",
|
||||||
|
entity_category=EntityCategory.CONFIG
|
||||||
|
),
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,35 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
|
||||||
icon="mdi:thermometer",
|
icon="mdi:thermometer",
|
||||||
translation_key="tumbledryertemplevel"
|
translation_key="tumbledryertemplevel"
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
"OV": (
|
||||||
|
SensorEntityDescription(
|
||||||
|
key="remainingTimeMM",
|
||||||
|
name="Remaining Time",
|
||||||
|
icon="mdi:timer",
|
||||||
|
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||||
|
),
|
||||||
|
SensorEntityDescription(
|
||||||
|
key="delayTime",
|
||||||
|
name="Start Time",
|
||||||
|
icon="mdi:clock-start",
|
||||||
|
native_unit_of_measurement=UnitOfTime.MINUTES,
|
||||||
|
),
|
||||||
|
|
||||||
|
SensorEntityDescription(
|
||||||
|
key="temp",
|
||||||
|
name="Temperature",
|
||||||
|
icon="mdi:thermometer",
|
||||||
|
),
|
||||||
|
|
||||||
|
SensorEntityDescription(
|
||||||
|
key="tempSel",
|
||||||
|
name="Temperature Selected",
|
||||||
|
icon="mdi:thermometer",
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue