mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Service/Script cleanup
This commit is contained in:
@@ -76,12 +76,12 @@ class Script():
|
||||
self._change_listener()
|
||||
return
|
||||
|
||||
elif service.validate_service_call(action) is None:
|
||||
self._call_service(action, variables)
|
||||
|
||||
elif CONF_EVENT in action:
|
||||
self._fire_event(action)
|
||||
|
||||
else:
|
||||
self._call_service(action, variables)
|
||||
|
||||
self._cur = -1
|
||||
self.last_action = None
|
||||
if self._change_listener:
|
||||
@@ -102,7 +102,8 @@ class Script():
|
||||
"""Call the service specified in the action."""
|
||||
self.last_action = action.get(CONF_ALIAS, 'call service')
|
||||
self._log("Executing step %s", self.last_action)
|
||||
service.call_from_config(self.hass, action, True, variables)
|
||||
service.call_from_config(self.hass, action, True, variables,
|
||||
validate_config=False)
|
||||
|
||||
def _fire_event(self, action):
|
||||
"""Fire an event."""
|
||||
|
||||
Reference in New Issue
Block a user