mirror of
https://github.com/Andre0512/hon.git
synced 2025-05-22 02:45:07 -04:00
Added WD device type sensors.
This commit is contained in:
parent
135d6cafed
commit
05e9d835b1
7 changed files with 157 additions and 5 deletions
|
@ -58,7 +58,44 @@ BINARY_SENSORS: dict[str, tuple[HonBinarySensorEntityDescription, ...]] = {
|
|||
device_class=BinarySensorDeviceClass.DOOR,
|
||||
on_value="1",
|
||||
),
|
||||
)
|
||||
),
|
||||
"WD": (
|
||||
HonBinarySensorEntityDescription(
|
||||
key="attributes.lastConnEvent.category",
|
||||
name="Remote Control",
|
||||
device_class=BinarySensorDeviceClass.CONNECTIVITY,
|
||||
on_value="CONNECTED",
|
||||
icon="mdi:remote"
|
||||
),
|
||||
HonBinarySensorEntityDescription(
|
||||
key="startProgram.prewash",
|
||||
name="Pre Wash",
|
||||
),
|
||||
HonBinarySensorEntityDescription(
|
||||
key="extraRinse1",
|
||||
name="Extra Rinse 1",
|
||||
),
|
||||
HonBinarySensorEntityDescription(
|
||||
key="extraRinse2",
|
||||
name="Extra Rinse 2",
|
||||
),
|
||||
HonBinarySensorEntityDescription(
|
||||
key="extraRinse3",
|
||||
name="Extra Rinse 3",
|
||||
),
|
||||
HonBinarySensorEntityDescription(
|
||||
key="goodNight",
|
||||
name="Good Night Mode",
|
||||
),
|
||||
HonBinarySensorEntityDescription(
|
||||
key="acquaplus",
|
||||
name="Acqua Plus",
|
||||
),
|
||||
HonBinarySensorEntityDescription(
|
||||
key="anticrease",
|
||||
name="Anti-Crease",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,7 +114,7 @@ async def async_setup_entry(hass, entry: ConfigEntry, async_add_entities) -> Non
|
|||
if descriptions := BINARY_SENSORS.get(device.appliance_type):
|
||||
for description in descriptions:
|
||||
if not device.get(description.key):
|
||||
_LOGGER.info("Can't setup %s", description.key)
|
||||
_LOGGER.warning("[%s] Can't setup %s", device.appliance_type, description.key)
|
||||
continue
|
||||
appliances.extend([
|
||||
HonBinarySensorEntity(hass, coordinator, entry, device, description)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue