1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Calling a service can now block till execution is done

This commit is contained in:
Paulus Schoutsen
2014-12-13 22:40:00 -08:00
parent f8223053bd
commit 78d5625ace
6 changed files with 85 additions and 29 deletions

View File

@@ -20,7 +20,8 @@ EVENT_HOMEASSISTANT_START = "homeassistant_start"
EVENT_HOMEASSISTANT_STOP = "homeassistant_stop"
EVENT_STATE_CHANGED = "state_changed"
EVENT_TIME_CHANGED = "time_changed"
EVENT_CALL_SERVICE = "services.call"
EVENT_CALL_SERVICE = "call_service"
EVENT_SERVICE_EXECUTED = "service_executed"
# #### STATES ####
STATE_ON = 'on'
@@ -28,7 +29,7 @@ STATE_OFF = 'off'
STATE_HOME = 'home'
STATE_NOT_HOME = 'not_home'
# #### STATE ATTRIBUTES ####
# #### STATE AND EVENT ATTRIBUTES ####
# Contains current time for a TIME_CHANGED event
ATTR_NOW = "now"
@@ -36,6 +37,10 @@ ATTR_NOW = "now"
ATTR_DOMAIN = "domain"
ATTR_SERVICE = "service"
# Data for a SERVICE_EXECUTED event
ATTR_SERVICE_CALL_ID = "service_call_id"
ATTR_RESULT = "result"
# Contains one string or a list of strings, each being an entity id
ATTR_ENTITY_ID = 'entity_id'