Consolidate frontend (#9915)
* Consolidate frontend * Remove home-assistant-polymer submodule * Convert to using a pypi package for frontend * fix release script * Lint * Remove unused file * Remove frontend related scripts * Move hass_frontend to frontend REQUIREMENTS * Fix tests * lint * Address comments * Lint + fix tests in py34 * Fix py34 tests again * fix typo
This commit is contained in:
1 parent
29fb65b224
commit
2bdad5388b
169 files changed
+372
-5396
No files matched your search
@@ -4,13 +4,13 @@ Register a custom front end panel.
|
||||
For more details about this component, please refer to the documentation at
|
||||
https://home-assistant.io/components/panel_custom/
|
||||
"""
|
||||
import asyncio
|
||||
import logging
|
||||
import os
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.frontend import register_panel
|
||||
|
||||
DOMAIN = 'panel_custom'
|
||||
DEPENDENCIES = ['frontend']
|
||||
@@ -40,7 +40,8 @@ CONFIG_SCHEMA = vol.Schema({
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup(hass, config):
|
||||
@asyncio.coroutine
|
||||
def async_setup(hass, config):
|
||||
"""Initialize custom panel."""
|
||||
success = False
|
||||
|
||||
@@ -56,8 +57,8 @@ def setup(hass, config):
|
||||
name, panel_path)
|
||||
continue
|
||||
|
||||
register_panel(
|
||||
hass, name, panel_path,
|
||||
yield from hass.components.frontend.async_register_panel(
|
||||
name, panel_path,
|
||||
sidebar_title=panel.get(CONF_SIDEBAR_TITLE),
|
||||
sidebar_icon=panel.get(CONF_SIDEBAR_ICON),
|
||||
url_path=panel.get(CONF_URL_PATH),
|
||||
|
||||
Reference in new issue
Block a user