Scene: add support for input_select (#4674)
This adds support for the scene component to handle input_select devices and set their options. This fixes bug #4673 Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>pull/4798/head^2
parent
82ad8b0a8f
commit
d0dcd1bb73
|
@ -278,6 +278,8 @@ ATTR_GPS_ACCURACY = 'gps_accuracy'
|
|||
ATTR_ASSUMED_STATE = 'assumed_state'
|
||||
ATTR_STATE = 'state'
|
||||
|
||||
ATTR_OPTION = 'option'
|
||||
|
||||
# #### SERVICES ####
|
||||
SERVICE_HOMEASSISTANT_STOP = 'stop'
|
||||
SERVICE_HOMEASSISTANT_RESTART = 'restart'
|
||||
|
@ -318,6 +320,8 @@ SERVICE_SET_COVER_TILT_POSITION = 'set_cover_tilt_position'
|
|||
SERVICE_STOP_COVER = 'stop_cover'
|
||||
SERVICE_STOP_COVER_TILT = 'stop_cover_tilt'
|
||||
|
||||
SERVICE_SELECT_OPTION = 'select_option'
|
||||
|
||||
# #### API / REMOTE ####
|
||||
SERVER_PORT = 8123
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ from homeassistant.const import (
|
|||
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)
|
||||
STATE_UNKNOWN, STATE_UNLOCKED, SERVICE_SELECT_OPTION, ATTR_OPTION)
|
||||
from homeassistant.core import State
|
||||
from homeassistant.util.async import run_coroutine_threadsafe
|
||||
|
||||
|
@ -58,7 +58,8 @@ SERVICE_ATTRIBUTES = {
|
|||
SERVICE_SET_OPERATION_MODE: [ATTR_OPERATION_MODE],
|
||||
SERVICE_SET_AUX_HEAT: [ATTR_AUX_HEAT],
|
||||
SERVICE_SELECT_SOURCE: [ATTR_INPUT_SOURCE],
|
||||
SERVICE_SEND_IR_CODE: [ATTR_IR_CODE]
|
||||
SERVICE_SEND_IR_CODE: [ATTR_IR_CODE],
|
||||
SERVICE_SELECT_OPTION: [ATTR_OPTION]
|
||||
}
|
||||
|
||||
# Update this dict when new services are added to HA.
|
||||
|
|
Loading…
Reference in New Issue