Fix calling permanent off with nexia (#73623)
* Fix calling permanent off with nexia Changelog: https://github.com/bdraco/nexia/compare/1.0.1...1.0.2 Fixes #73610 * one morepull/73821/head
parent
1551177581
commit
65c1d4812a
|
@ -391,7 +391,9 @@ class NexiaZone(NexiaThermostatZoneEntity, ClimateEntity):
|
||||||
|
|
||||||
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
||||||
"""Set the system mode (Auto, Heat_Cool, Cool, Heat, etc)."""
|
"""Set the system mode (Auto, Heat_Cool, Cool, Heat, etc)."""
|
||||||
if hvac_mode == HVACMode.AUTO:
|
if hvac_mode == HVACMode.OFF:
|
||||||
|
await self._zone.call_permanent_off()
|
||||||
|
elif hvac_mode == HVACMode.AUTO:
|
||||||
await self._zone.call_return_to_schedule()
|
await self._zone.call_return_to_schedule()
|
||||||
await self._zone.set_mode(mode=OPERATION_MODE_AUTO)
|
await self._zone.set_mode(mode=OPERATION_MODE_AUTO)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"domain": "nexia",
|
"domain": "nexia",
|
||||||
"name": "Nexia/American Standard/Trane",
|
"name": "Nexia/American Standard/Trane",
|
||||||
"requirements": ["nexia==1.0.1"],
|
"requirements": ["nexia==1.0.2"],
|
||||||
"codeowners": ["@bdraco"],
|
"codeowners": ["@bdraco"],
|
||||||
"documentation": "https://www.home-assistant.io/integrations/nexia",
|
"documentation": "https://www.home-assistant.io/integrations/nexia",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
||||||
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
from nexia.const import OPERATION_MODE_OFF
|
||||||
from nexia.home import NexiaHome
|
from nexia.home import NexiaHome
|
||||||
from nexia.thermostat import NexiaThermostat
|
from nexia.thermostat import NexiaThermostat
|
||||||
from nexia.zone import NexiaThermostatZone
|
from nexia.zone import NexiaThermostatZone
|
||||||
|
@ -58,7 +59,10 @@ class NexiaHoldSwitch(NexiaThermostatZoneEntity, SwitchEntity):
|
||||||
|
|
||||||
async def async_turn_on(self, **kwargs: Any) -> None:
|
async def async_turn_on(self, **kwargs: Any) -> None:
|
||||||
"""Enable permanent hold."""
|
"""Enable permanent hold."""
|
||||||
await self._zone.call_permanent_hold()
|
if self._zone.get_current_mode() == OPERATION_MODE_OFF:
|
||||||
|
await self._zone.call_permanent_off()
|
||||||
|
else:
|
||||||
|
await self._zone.call_permanent_hold()
|
||||||
self._signal_zone_update()
|
self._signal_zone_update()
|
||||||
|
|
||||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||||
|
|
|
@ -1080,7 +1080,7 @@ nettigo-air-monitor==1.2.4
|
||||||
neurio==0.3.1
|
neurio==0.3.1
|
||||||
|
|
||||||
# homeassistant.components.nexia
|
# homeassistant.components.nexia
|
||||||
nexia==1.0.1
|
nexia==1.0.2
|
||||||
|
|
||||||
# homeassistant.components.nextcloud
|
# homeassistant.components.nextcloud
|
||||||
nextcloudmonitor==1.1.0
|
nextcloudmonitor==1.1.0
|
||||||
|
|
|
@ -745,7 +745,7 @@ netmap==0.7.0.2
|
||||||
nettigo-air-monitor==1.2.4
|
nettigo-air-monitor==1.2.4
|
||||||
|
|
||||||
# homeassistant.components.nexia
|
# homeassistant.components.nexia
|
||||||
nexia==1.0.1
|
nexia==1.0.2
|
||||||
|
|
||||||
# homeassistant.components.discord
|
# homeassistant.components.discord
|
||||||
nextcord==2.0.0a8
|
nextcord==2.0.0a8
|
||||||
|
|
Loading…
Reference in New Issue