diff --git a/homeassistant/const.py b/homeassistant/const.py index d9191eaedf2..0a014c0b603 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -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 diff --git a/homeassistant/helpers/state.py b/homeassistant/helpers/state.py index 9980ad11a8d..46b7837dc15 100644 --- a/homeassistant/helpers/state.py +++ b/homeassistant/helpers/state.py @@ -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.