Skip to content

Commit

Permalink
Add duotecno OFF hvac mode (#103223)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cereal2nd committed Nov 8, 2023
1 parent 0a2a699 commit a78ef60
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
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

0 comments on commit a78ef60

Please sign in to comment.