mirror of
https://github.com/Andre0512/hon.git
synced 2025-05-15 23:54:23 -04:00
Add some sensors
This commit is contained in:
parent
f02ec780a2
commit
6516f87127
6 changed files with 77 additions and 26 deletions
|
@ -63,6 +63,12 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
|||
icon="mdi:tshirt-crew",
|
||||
translation_key="prewash",
|
||||
),
|
||||
HonConfigSwitchEntityDescription(
|
||||
key="startProgram.prewash",
|
||||
name="Prewash",
|
||||
icon="mdi:tshirt-crew",
|
||||
translation_key="prewash",
|
||||
),
|
||||
HonConfigSwitchEntityDescription(
|
||||
key="startProgram.permanentPressStatus",
|
||||
name="Keep Fresh",
|
||||
|
@ -81,6 +87,18 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
|||
icon="mdi:cup",
|
||||
translation_key="auto_dose_detergent",
|
||||
),
|
||||
HonSwitchEntityDescription(
|
||||
key="autoSoftenerStatus",
|
||||
name="Auto Dose Softener",
|
||||
icon="mdi:teddy-bear",
|
||||
translation_key="auto_dose_softener",
|
||||
),
|
||||
HonSwitchEntityDescription(
|
||||
key="autoDetergentStatus",
|
||||
name="Auto Dose Detergent",
|
||||
icon="mdi:cup",
|
||||
translation_key="auto_dose_detergent",
|
||||
),
|
||||
HonConfigSwitchEntityDescription(
|
||||
key="startProgram.acquaplus",
|
||||
name="Acqua Plus",
|
||||
|
@ -117,6 +135,12 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
|||
icon="mdi:lotion-plus",
|
||||
translation_key="hygiene",
|
||||
),
|
||||
HonConfigSwitchEntityDescription(
|
||||
key="startProgram.anticrease",
|
||||
name="Anti-Crease",
|
||||
icon="mdi:iron",
|
||||
translation_key="anti_crease",
|
||||
),
|
||||
),
|
||||
"TD": (
|
||||
HonControlSwitchEntityDescription(
|
||||
|
@ -138,7 +162,13 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
|||
HonConfigSwitchEntityDescription(
|
||||
key="startProgram.sterilizationStatus",
|
||||
name="Sterilization",
|
||||
icon="mdi:clock-start",
|
||||
icon="mdi:lotion-plus",
|
||||
),
|
||||
HonConfigSwitchEntityDescription(
|
||||
key="startProgram.tumblingStatus",
|
||||
name="Tumbling",
|
||||
icon="mdi:refresh-circle",
|
||||
translation_key="keep_fresh",
|
||||
),
|
||||
HonConfigSwitchEntityDescription(
|
||||
key="startProgram.antiCreaseTime",
|
||||
|
@ -370,10 +400,7 @@ async def async_setup_entry(
|
|||
continue
|
||||
entity = HonControlSwitchEntity(hass, entry, device, description)
|
||||
elif isinstance(description, HonSwitchEntityDescription):
|
||||
if (
|
||||
f"settings.{description.key}" not in device.available_settings
|
||||
or device.get(description.key) is None
|
||||
):
|
||||
if f"settings.{description.key}" not in device.available_settings:
|
||||
continue
|
||||
entity = HonSwitchEntity(hass, entry, device, description)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue