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 e45582d439
.
pull/3363/head
parent
6959407dfd
commit
24f1bff7f1
|
@ -29,10 +29,10 @@ from homeassistant.const import (
|
||||||
SERVICE_CLOSE, SERVICE_LOCK, SERVICE_MEDIA_PAUSE, SERVICE_MEDIA_PLAY,
|
SERVICE_CLOSE, SERVICE_LOCK, SERVICE_MEDIA_PAUSE, SERVICE_MEDIA_PLAY,
|
||||||
SERVICE_MEDIA_SEEK, SERVICE_MOVE_DOWN, SERVICE_MOVE_UP, SERVICE_OPEN,
|
SERVICE_MEDIA_SEEK, SERVICE_MOVE_DOWN, SERVICE_MOVE_UP, SERVICE_OPEN,
|
||||||
SERVICE_TURN_OFF, SERVICE_TURN_ON, SERVICE_UNLOCK, SERVICE_VOLUME_MUTE,
|
SERVICE_TURN_OFF, SERVICE_TURN_ON, SERVICE_UNLOCK, SERVICE_VOLUME_MUTE,
|
||||||
SERVICE_VOLUME_SET, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME,
|
SERVICE_VOLUME_SET, SERVICE_OPEN_COVER, SERVICE_CLOSE_COVER,
|
||||||
STATE_ALARM_DISARMED, STATE_ALARM_TRIGGERED, STATE_CLOSED, STATE_LOCKED,
|
STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED,
|
||||||
STATE_OFF, STATE_ON, STATE_OPEN, STATE_PAUSED, STATE_PLAYING,
|
STATE_ALARM_TRIGGERED, STATE_CLOSED, STATE_LOCKED, STATE_OFF, STATE_ON,
|
||||||
STATE_UNKNOWN, STATE_UNLOCKED)
|
STATE_OPEN, STATE_PAUSED, STATE_PLAYING, STATE_UNKNOWN, STATE_UNLOCKED)
|
||||||
from homeassistant.core import State
|
from homeassistant.core import State
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
@ -77,6 +77,8 @@ SERVICE_TO_STATE = {
|
||||||
SERVICE_OPEN: STATE_OPEN,
|
SERVICE_OPEN: STATE_OPEN,
|
||||||
SERVICE_MOVE_UP: STATE_OPEN,
|
SERVICE_MOVE_UP: STATE_OPEN,
|
||||||
SERVICE_MOVE_DOWN: STATE_CLOSED,
|
SERVICE_MOVE_DOWN: STATE_CLOSED,
|
||||||
|
SERVICE_OPEN_COVER: STATE_OPEN,
|
||||||
|
SERVICE_CLOSE_COVER: STATE_CLOSED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue