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

Add support for automation config panel (#7509)

* Add support for automation config

* Build fromtend

* Lint
This commit is contained in:
Paulus Schoutsen
2017-05-09 18:44:00 -07:00
committed by GitHub
parent d86dfb6336
commit 5d820ec188
16 changed files with 144 additions and 26 deletions

View File

@@ -0,0 +1,20 @@
"""Provide configuration end points for Z-Wave."""
import asyncio
from homeassistant.components.config import EditIdBasedConfigView
from homeassistant.components.automation import (
PLATFORM_SCHEMA, DOMAIN, async_reload)
import homeassistant.helpers.config_validation as cv
CONFIG_PATH = 'automations.yaml'
@asyncio.coroutine
def async_setup(hass):
"""Set up the Automation config API."""
hass.http.register_view(EditIdBasedConfigView(
DOMAIN, 'config', CONFIG_PATH, cv.string,
PLATFORM_SCHEMA, post_write_hook=async_reload
))
return True