Fix Rachio switch state when paused (#40984)
This commit is contained in:
parent
639c864a76
commit
40ea30da96
2 changed files with 7 additions and 1 deletions
homeassistant/components/rachio
|
@ -56,6 +56,7 @@ from .webhooks import (
|
|||
SUBTYPE_SLEEP_MODE_OFF,
|
||||
SUBTYPE_SLEEP_MODE_ON,
|
||||
SUBTYPE_ZONE_COMPLETED,
|
||||
SUBTYPE_ZONE_PAUSED,
|
||||
SUBTYPE_ZONE_STARTED,
|
||||
SUBTYPE_ZONE_STOPPED,
|
||||
)
|
||||
|
@ -392,7 +393,11 @@ class RachioZone(RachioSwitch):
|
|||
|
||||
if args[0][KEY_SUBTYPE] == SUBTYPE_ZONE_STARTED:
|
||||
self._state = True
|
||||
elif args[0][KEY_SUBTYPE] in [SUBTYPE_ZONE_STOPPED, SUBTYPE_ZONE_COMPLETED]:
|
||||
elif args[0][KEY_SUBTYPE] in [
|
||||
SUBTYPE_ZONE_STOPPED,
|
||||
SUBTYPE_ZONE_COMPLETED,
|
||||
SUBTYPE_ZONE_PAUSED,
|
||||
]:
|
||||
self._state = False
|
||||
|
||||
self.async_write_ha_state()
|
||||
|
|
|
@ -58,6 +58,7 @@ SUBTYPE_ZONE_STOPPED = "ZONE_STOPPED"
|
|||
SUBTYPE_ZONE_COMPLETED = "ZONE_COMPLETED"
|
||||
SUBTYPE_ZONE_CYCLING = "ZONE_CYCLING"
|
||||
SUBTYPE_ZONE_CYCLING_COMPLETED = "ZONE_CYCLING_COMPLETED"
|
||||
SUBTYPE_ZONE_PAUSED = "ZONE_PAUSED"
|
||||
|
||||
# Webhook callbacks
|
||||
LISTEN_EVENT_TYPES = [
|
||||
|
|
Loading…
Add table
Reference in a new issue