Add 'open', 'closed' for open/close_cover_tilt

pull/3180/head
Nick Vella 2016-09-04 23:44:52 +10:00
parent 841374d2c7
commit e45582d439
1 changed files with 7 additions and 4 deletions

View File

@ -30,9 +30,10 @@ from homeassistant.const import (
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, 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)
SERVICE_OPEN_COVER_TILT, SERVICE_CLOSE_COVER_TILT, 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__)
@ -78,7 +79,9 @@ SERVICE_TO_STATE = {
SERVICE_MOVE_UP: STATE_OPEN,
SERVICE_MOVE_DOWN: STATE_CLOSED,
SERVICE_OPEN_COVER: STATE_OPEN,
SERVICE_CLOSE_COVER: STATE_CLOSED
SERVICE_CLOSE_COVER: STATE_CLOSED,
SERVICE_OPEN_COVER_TILT: STATE_OPEN,
SERVICE_CLOSE_COVER_TILT: STATE_CLOSED
}