Add dishwasher #21

This commit is contained in:
Andre Basche 2023-04-16 21:46:17 +02:00
parent 2aa1d3df01
commit 5f9dbef4fc
8 changed files with 285 additions and 12 deletions

View file

@ -21,6 +21,7 @@ from homeassistant.const import (
from homeassistant.core import callback
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.typing import StateType
from homeassistant.const import PERCENTAGE
from .const import DOMAIN
from .hon import HonCoordinator, HonEntity
@ -237,6 +238,69 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
),
SensorEntityDescription(key="errors", name="Error", icon="mdi:math-log"),
),
"DW": (
SensorEntityDescription(
key="startProgram.ecoIndex",
name="Eco Index",
icon="mdi:sprout",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.CONFIG,
),
SensorEntityDescription(
key="startProgram.waterEfficiency",
name="Water Efficiency",
icon="mdi:water",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.CONFIG,
),
SensorEntityDescription(
key="startProgram.waterSaving",
name="Water Saving",
icon="mdi:water-percent",
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=PERCENTAGE,
entity_category=EntityCategory.CONFIG,
),
SensorEntityDescription(
key="startProgram.temp",
name="Temperature",
icon="mdi:thermometer",
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
entity_category=EntityCategory.CONFIG,
),
SensorEntityDescription(
key="startProgram.energyLabel",
name="Energy Label",
icon="mdi:lightning-bolt-circle",
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.CONFIG,
),
SensorEntityDescription(
key="startProgram.remainingTime",
name="Time",
icon="mdi:timer",
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfTime.MINUTES,
entity_category=EntityCategory.CONFIG,
),
SensorEntityDescription(
key="machMode",
name="Machine Status",
icon="mdi:information",
translation_key="mode_dw",
),
SensorEntityDescription(
key="errors", name="Error", icon="mdi:math-log", translation_key="errors"
),
SensorEntityDescription(
key="remainingTimeMM",
name="Remaining Time",
icon="mdi:timer",
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfTime.MINUTES,
),
),
}