Add device automation support to switch entities (#26466)

* Add device automation support to switch entities

* Update switch translations

* Address review comments
This commit is contained in:
Erik Montnemery 2019-09-09 16:55:47 +02:00 committed by GitHub
parent fec6706bf7
commit b14b14c3c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 687 additions and 216 deletions

View file

@ -333,7 +333,9 @@ class Script:
self._log("Executing step %s" % self.last_action)
integration = await async_get_integration(self.hass, action[CONF_DOMAIN])
platform = integration.get_platform("device_automation")
await platform.async_action_from_config(self.hass, action, variables, context)
await platform.async_call_action_from_config(
self.hass, action, variables, context
)
async def _async_fire_event(self, action, variables, context):
"""Fire an event."""