From f83730219456966493d5cc4766a5eefb8e2cd52f Mon Sep 17 00:00:00 2001 From: Charles Garwood Date: Wed, 11 Oct 2017 11:45:55 -0400 Subject: [PATCH] Split map panel out into its own component (#9814) --- homeassistant/components/frontend/__init__.py | 2 -- homeassistant/components/map.py | 18 ++++++++++++++++++ homeassistant/config.py | 3 +++ 3 files changed, 21 insertions(+), 2 deletions(-) mode change 100644 => 100755 homeassistant/components/frontend/__init__.py create mode 100755 homeassistant/components/map.py mode change 100644 => 100755 homeassistant/config.py diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py old mode 100644 new mode 100755 index 112c93403b0..797a0f6b929 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -225,8 +225,6 @@ def setup(hass, config): if DATA_EXTRA_HTML_URL not in hass.data: hass.data[DATA_EXTRA_HTML_URL] = set() - register_built_in_panel(hass, 'map', 'Map', 'mdi:account-location') - for panel in ('dev-event', 'dev-info', 'dev-service', 'dev-state', 'dev-template', 'dev-mqtt', 'kiosk'): register_built_in_panel(hass, panel) diff --git a/homeassistant/components/map.py b/homeassistant/components/map.py new file mode 100755 index 00000000000..a1b8f4cfdf3 --- /dev/null +++ b/homeassistant/components/map.py @@ -0,0 +1,18 @@ +""" +Provides a map panel for showing device locations. + +For more details about this component, please refer to the documentation at +https://home-assistant.io/components/map/ +""" +import asyncio + +from homeassistant.components.frontend import register_built_in_panel + +DOMAIN = 'map' + + +@asyncio.coroutine +def async_setup(hass, config): + """Register the built-in map panel.""" + register_built_in_panel(hass, 'map', 'Map', 'mdi:account-location') + return True diff --git a/homeassistant/config.py b/homeassistant/config.py old mode 100644 new mode 100755 index 6be0e776f3f..1398de0aa00 --- a/homeassistant/config.py +++ b/homeassistant/config.py @@ -96,6 +96,9 @@ history: # View all events in a logbook logbook: +# Enables a map showing the location of tracked devices +map: + # Track the sun sun: