mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Add developer tools panel (#24812)
This commit is contained in:
parent
a69a00785f
commit
80844ae2ee
@ -256,9 +256,15 @@ async def async_setup(hass, config):
|
|||||||
for panel in ('kiosk', 'states', 'profile'):
|
for panel in ('kiosk', 'states', 'profile'):
|
||||||
async_register_built_in_panel(hass, panel)
|
async_register_built_in_panel(hass, panel)
|
||||||
|
|
||||||
for panel in ('dev-event', 'dev-info', 'dev-service', 'dev-state',
|
# To smooth transition to new urls, add redirects to new urls of dev tools
|
||||||
'dev-template', 'dev-mqtt'):
|
# Added June 27, 2019. Can be removed in 2021.
|
||||||
async_register_built_in_panel(hass, panel, require_admin=True)
|
for panel in ('event', 'info', 'service', 'state', 'template', 'mqtt'):
|
||||||
|
hass.http.register_redirect('/dev-{}'.format(panel),
|
||||||
|
'/developer-tools/{}'.format(panel))
|
||||||
|
|
||||||
|
async_register_built_in_panel(
|
||||||
|
hass, "developer-tools", require_admin=True,
|
||||||
|
sidebar_title="Developer Tools", sidebar_icon="hass:hammer")
|
||||||
|
|
||||||
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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user