mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
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 more
This commit is contained in:
parent
027f54ca15
commit
7a792b093f
@ -391,7 +391,9 @@ class NexiaZone(NexiaThermostatZoneEntity, ClimateEntity):
|
||||
|
||||
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
||||
"""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.set_mode(mode=OPERATION_MODE_AUTO)
|
||||
else:
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"domain": "nexia",
|
||||
"name": "Nexia/American Standard/Trane",
|
||||
"requirements": ["nexia==1.0.1"],
|
||||
"requirements": ["nexia==1.0.2"],
|
||||
"codeowners": ["@bdraco"],
|
||||
"documentation": "https://www.home-assistant.io/integrations/nexia",
|
||||
"config_flow": true,
|
||||
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from nexia.const import OPERATION_MODE_OFF
|
||||
from nexia.home import NexiaHome
|
||||
from nexia.thermostat import NexiaThermostat
|
||||
from nexia.zone import NexiaThermostatZone
|
||||
@ -58,7 +59,10 @@ class NexiaHoldSwitch(NexiaThermostatZoneEntity, SwitchEntity):
|
||||
|
||||
async def async_turn_on(self, **kwargs: Any) -> None:
|
||||
"""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()
|
||||
|
||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||
|
@ -1083,7 +1083,7 @@ nettigo-air-monitor==1.3.0
|
||||
neurio==0.3.1
|
||||
|
||||
# homeassistant.components.nexia
|
||||
nexia==1.0.1
|
||||
nexia==1.0.2
|
||||
|
||||
# homeassistant.components.nextcloud
|
||||
nextcloudmonitor==1.1.0
|
||||
|
@ -748,7 +748,7 @@ netmap==0.7.0.2
|
||||
nettigo-air-monitor==1.3.0
|
||||
|
||||
# homeassistant.components.nexia
|
||||
nexia==1.0.1
|
||||
nexia==1.0.2
|
||||
|
||||
# homeassistant.components.discord
|
||||
nextcord==2.0.0a8
|
||||
|
Loading…
x
Reference in New Issue
Block a user