mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add duotecno OFF hvac mode (#103223)
This commit is contained in:
parent
0a2a699133
commit
a78ef60773
@ -23,12 +23,7 @@ HVACMODE: Final = {
|
|||||||
}
|
}
|
||||||
HVACMODE_REVERSE: Final = {value: key for key, value in HVACMODE.items()}
|
HVACMODE_REVERSE: Final = {value: key for key, value in HVACMODE.items()}
|
||||||
|
|
||||||
PRESETMODES: Final = {
|
PRESETMODES: Final = {"sun": 0, "half_sun": 1, "moon": 2, "half_moon": 3}
|
||||||
"sun": 0,
|
|
||||||
"half_sun": 1,
|
|
||||||
"moon": 2,
|
|
||||||
"half_moon": 3,
|
|
||||||
}
|
|
||||||
PRESETMODES_REVERSE: Final = {value: key for key, value in PRESETMODES.items()}
|
PRESETMODES_REVERSE: Final = {value: key for key, value in PRESETMODES.items()}
|
||||||
|
|
||||||
|
|
||||||
@ -88,5 +83,10 @@ class DuotecnoClimate(DuotecnoEntity, ClimateEntity):
|
|||||||
"""Set the preset mode."""
|
"""Set the preset mode."""
|
||||||
await self._unit.set_preset(PRESETMODES[preset_mode])
|
await self._unit.set_preset(PRESETMODES[preset_mode])
|
||||||
|
|
||||||
|
@api_call
|
||||||
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
||||||
"""Duotecno does not support setting this, we can only display it."""
|
"""Duotecno does not support setting this, we can only display it."""
|
||||||
|
if hvac_mode == HVACMode.OFF:
|
||||||
|
await self._unit.turn_off()
|
||||||
|
else:
|
||||||
|
await self._unit.turn_on()
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"loggers": ["pyduotecno", "pyduotecno-node", "pyduotecno-unit"],
|
"loggers": ["pyduotecno", "pyduotecno-node", "pyduotecno-unit"],
|
||||||
"quality_scale": "silver",
|
"quality_scale": "silver",
|
||||||
"requirements": ["pyDuotecno==2023.10.1"]
|
"requirements": ["pyDuotecno==2023.11.1"]
|
||||||
}
|
}
|
||||||
|
@ -1557,7 +1557,7 @@ pyCEC==0.5.2
|
|||||||
pyControl4==1.1.0
|
pyControl4==1.1.0
|
||||||
|
|
||||||
# homeassistant.components.duotecno
|
# homeassistant.components.duotecno
|
||||||
pyDuotecno==2023.10.1
|
pyDuotecno==2023.11.1
|
||||||
|
|
||||||
# homeassistant.components.electrasmart
|
# homeassistant.components.electrasmart
|
||||||
pyElectra==1.2.0
|
pyElectra==1.2.0
|
||||||
|
@ -1190,7 +1190,7 @@ pyCEC==0.5.2
|
|||||||
pyControl4==1.1.0
|
pyControl4==1.1.0
|
||||||
|
|
||||||
# homeassistant.components.duotecno
|
# homeassistant.components.duotecno
|
||||||
pyDuotecno==2023.10.1
|
pyDuotecno==2023.11.1
|
||||||
|
|
||||||
# homeassistant.components.electrasmart
|
# homeassistant.components.electrasmart
|
||||||
pyElectra==1.2.0
|
pyElectra==1.2.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user