2021-02-08 13:44:46 +00:00
|
|
|
"""Support for my.home-assistant.io redirect service."""
|
2022-01-14 09:01:12 +00:00
|
|
|
from homeassistant.components import frontend
|
2022-01-02 15:28:14 +00:00
|
|
|
from homeassistant.core import HomeAssistant
|
2023-05-29 18:58:00 +00:00
|
|
|
from homeassistant.helpers import config_validation as cv
|
2022-01-02 15:28:14 +00:00
|
|
|
from homeassistant.helpers.typing import ConfigType
|
2021-02-08 13:44:46 +00:00
|
|
|
|
|
|
|
DOMAIN = "my"
|
|
|
|
URL_PATH = "_my_redirect"
|
|
|
|
|
2023-05-29 18:58:00 +00:00
|
|
|
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
|
|
|
|
|
2021-02-08 13:44:46 +00:00
|
|
|
|
2022-01-02 15:28:14 +00:00
|
|
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
2021-02-08 13:44:46 +00:00
|
|
|
"""Register hidden _my_redirect panel."""
|
2022-01-14 09:01:12 +00:00
|
|
|
frontend.async_register_built_in_panel(hass, DOMAIN, frontend_url_path=URL_PATH)
|
2021-02-08 13:44:46 +00:00
|
|
|
return True
|