Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add duotecno OFF hvac mode #103223

Merged
merged 10 commits into from
Nov 8, 2023
12 changes: 6 additions & 6 deletions homeassistant/components/duotecno/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@
}
HVACMODE_REVERSE: Final = {value: key for key, value in HVACMODE.items()}

PRESETMODES: Final = {
"sun": 0,
"half_sun": 1,
"moon": 2,
"half_moon": 3,
}
PRESETMODES: Final = {"sun": 0, "half_sun": 1, "moon": 2, "half_moon": 3}
PRESETMODES_REVERSE: Final = {value: key for key, value in PRESETMODES.items()}


Expand Down Expand Up @@ -88,5 +83,10 @@ async def async_set_preset_mode(self, preset_mode: str) -> None:
"""Set the preset mode."""
await self._unit.set_preset(PRESETMODES[preset_mode])

@api_call
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
"""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()
2 changes: 1 addition & 1 deletion homeassistant/components/duotecno/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"iot_class": "local_push",
"loggers": ["pyduotecno", "pyduotecno-node", "pyduotecno-unit"],
"quality_scale": "silver",
"requirements": ["pyDuotecno==2023.10.1"]
"requirements": ["pyDuotecno==2023.11.1"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,7 @@ pyCEC==0.5.2
pyControl4==1.1.0

# homeassistant.components.duotecno
pyDuotecno==2023.10.1
pyDuotecno==2023.11.1

# homeassistant.components.electrasmart
pyElectra==1.2.0
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ pyCEC==0.5.2
pyControl4==1.1.0

# homeassistant.components.duotecno
pyDuotecno==2023.10.1
pyDuotecno==2023.11.1

# homeassistant.components.electrasmart
pyElectra==1.2.0
Expand Down