Register automation.reload service as an admin service. (#29582)

* homeassistant/components/automation/__init__.py

* Register automation.reload as an admin service.
This commit is contained in:
Alexei Chetroi authored and Paulus Schoutsen committed 2019-12-07 21:17:30 +01:00
1 parent d838a56c1d
commit ccb0fd5e32
3 files changed
+25 -15

No files matched your search

+4 -2
View File
@@ -44,6 +44,8 @@ async def async_trigger(hass, entity_id=ENTITY_MATCH_ALL):
@bind_hass
async def async_reload(hass):
async def async_reload(hass, context=None):
"""Reload the automation from config."""
await hass.services.async_call(DOMAIN, SERVICE_RELOAD)
await hass.services.async_call(
DOMAIN, SERVICE_RELOAD, blocking=True, context=context
)