From 24f1bff7f13b802d7bdda7415d3f53177512445c Mon Sep 17 00:00:00 2001 From: Nick Vella Date: Tue, 13 Sep 2016 11:31:44 +1000 Subject: [PATCH] Add open/closed state for open_cover and close_cover in SERVICE_TO_STATE (#3180) * Add open/closed state mapping for open_cover and close_cover * Add 'open', 'closed' for open/close_cover_tilt * Revert "Add 'open', 'closed' for open/close_cover_tilt" This reverts commit e45582d4394a33feedfce190a1dba96473d24825. --- homeassistant/helpers/state.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/homeassistant/helpers/state.py b/homeassistant/helpers/state.py index 9c6e797acd1..4935251db7d 100644 --- a/homeassistant/helpers/state.py +++ b/homeassistant/helpers/state.py @@ -29,10 +29,10 @@ from homeassistant.const import ( SERVICE_CLOSE, SERVICE_LOCK, SERVICE_MEDIA_PAUSE, SERVICE_MEDIA_PLAY, SERVICE_MEDIA_SEEK, SERVICE_MOVE_DOWN, SERVICE_MOVE_UP, SERVICE_OPEN, SERVICE_TURN_OFF, SERVICE_TURN_ON, SERVICE_UNLOCK, SERVICE_VOLUME_MUTE, - SERVICE_VOLUME_SET, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, - STATE_ALARM_DISARMED, STATE_ALARM_TRIGGERED, STATE_CLOSED, STATE_LOCKED, - STATE_OFF, STATE_ON, STATE_OPEN, STATE_PAUSED, STATE_PLAYING, - STATE_UNKNOWN, STATE_UNLOCKED) + SERVICE_VOLUME_SET, SERVICE_OPEN_COVER, SERVICE_CLOSE_COVER, + STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, + STATE_ALARM_TRIGGERED, STATE_CLOSED, STATE_LOCKED, STATE_OFF, STATE_ON, + STATE_OPEN, STATE_PAUSED, STATE_PLAYING, STATE_UNKNOWN, STATE_UNLOCKED) from homeassistant.core import State _LOGGER = logging.getLogger(__name__) @@ -77,6 +77,8 @@ SERVICE_TO_STATE = { SERVICE_OPEN: STATE_OPEN, SERVICE_MOVE_UP: STATE_OPEN, SERVICE_MOVE_DOWN: STATE_CLOSED, + SERVICE_OPEN_COVER: STATE_OPEN, + SERVICE_CLOSE_COVER: STATE_CLOSED }