1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00

Add initial group config (#6135)

This commit is contained in:
Paulus Schoutsen
2017-02-20 21:53:55 -08:00
committed by GitHub
parent 1910440a3c
commit 32873508b7
6 changed files with 335 additions and 80 deletions

View File

@@ -0,0 +1,19 @@
"""Provide configuration end points for Groups."""
import asyncio
from homeassistant.components.config import EditKeyBasedConfigView
from homeassistant.components.group import GROUP_SCHEMA, async_reload
import homeassistant.helpers.config_validation as cv
CONFIG_PATH = 'groups.yaml'
@asyncio.coroutine
def async_setup(hass):
"""Setup the Group config API."""
hass.http.register_view(EditKeyBasedConfigView(
'group', 'config', CONFIG_PATH, cv.slug,
GROUP_SCHEMA, post_write_hook=async_reload
))
return True