mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Split map panel out into its own component (#9814)
This commit is contained in:
parent
19887f8742
commit
f837302194
2
homeassistant/components/frontend/__init__.py
Normal file → Executable file
2
homeassistant/components/frontend/__init__.py
Normal file → Executable file
@ -225,8 +225,6 @@ def setup(hass, config):
|
|||||||
if DATA_EXTRA_HTML_URL not in hass.data:
|
if DATA_EXTRA_HTML_URL not in hass.data:
|
||||||
hass.data[DATA_EXTRA_HTML_URL] = set()
|
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',
|
for panel in ('dev-event', 'dev-info', 'dev-service', 'dev-state',
|
||||||
'dev-template', 'dev-mqtt', 'kiosk'):
|
'dev-template', 'dev-mqtt', 'kiosk'):
|
||||||
register_built_in_panel(hass, panel)
|
register_built_in_panel(hass, panel)
|
||||||
|
18
homeassistant/components/map.py
Executable file
18
homeassistant/components/map.py
Executable file
@ -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
|
3
homeassistant/config.py
Normal file → Executable file
3
homeassistant/config.py
Normal file → Executable file
@ -96,6 +96,9 @@ history:
|
|||||||
# View all events in a logbook
|
# View all events in a logbook
|
||||||
logbook:
|
logbook:
|
||||||
|
|
||||||
|
# Enables a map showing the location of tracked devices
|
||||||
|
map:
|
||||||
|
|
||||||
# Track the sun
|
# Track the sun
|
||||||
sun:
|
sun:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user