2019-03-18 02:13:06 +00:00
|
|
|
"""Permission constants for the websocket API.
|
|
|
|
|
|
|
|
Separate file to avoid circular imports.
|
|
|
|
"""
|
2021-05-21 16:39:18 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from typing import Final
|
|
|
|
|
2019-12-08 11:19:15 +00:00
|
|
|
from homeassistant.components.frontend import EVENT_PANELS_UPDATED
|
2020-02-25 19:18:21 +00:00
|
|
|
from homeassistant.components.lovelace.const import EVENT_LOVELACE_UPDATED
|
2019-12-08 11:19:15 +00:00
|
|
|
from homeassistant.components.persistent_notification import (
|
|
|
|
EVENT_PERSISTENT_NOTIFICATIONS_UPDATED,
|
|
|
|
)
|
2020-02-12 18:13:07 +00:00
|
|
|
from homeassistant.components.shopping_list import EVENT as EVENT_SHOPPING_LIST_UPDATED
|
2019-03-18 02:13:06 +00:00
|
|
|
from homeassistant.const import (
|
|
|
|
EVENT_COMPONENT_LOADED,
|
2019-12-08 11:19:15 +00:00
|
|
|
EVENT_CORE_CONFIG_UPDATE,
|
2019-03-18 02:13:06 +00:00
|
|
|
EVENT_SERVICE_REGISTERED,
|
|
|
|
EVENT_SERVICE_REMOVED,
|
|
|
|
EVENT_STATE_CHANGED,
|
2019-07-31 19:25:30 +00:00
|
|
|
EVENT_THEMES_UPDATED,
|
|
|
|
)
|
2019-05-08 03:04:57 +00:00
|
|
|
from homeassistant.helpers.area_registry import EVENT_AREA_REGISTRY_UPDATED
|
|
|
|
from homeassistant.helpers.device_registry import EVENT_DEVICE_REGISTRY_UPDATED
|
|
|
|
from homeassistant.helpers.entity_registry import EVENT_ENTITY_REGISTRY_UPDATED
|
2019-03-18 02:13:06 +00:00
|
|
|
|
|
|
|
# These are events that do not contain any sensitive data
|
|
|
|
# Except for state_changed, which is handled accordingly.
|
2021-05-21 16:39:18 +00:00
|
|
|
SUBSCRIBE_ALLOWLIST: Final[set[str]] = {
|
2020-02-12 18:13:07 +00:00
|
|
|
EVENT_AREA_REGISTRY_UPDATED,
|
2019-03-18 02:13:06 +00:00
|
|
|
EVENT_COMPONENT_LOADED,
|
2019-09-04 06:13:34 +00:00
|
|
|
EVENT_CORE_CONFIG_UPDATE,
|
2020-02-12 18:13:07 +00:00
|
|
|
EVENT_DEVICE_REGISTRY_UPDATED,
|
|
|
|
EVENT_ENTITY_REGISTRY_UPDATED,
|
|
|
|
EVENT_LOVELACE_UPDATED,
|
2019-05-30 11:37:01 +00:00
|
|
|
EVENT_PANELS_UPDATED,
|
2019-03-18 02:13:06 +00:00
|
|
|
EVENT_PERSISTENT_NOTIFICATIONS_UPDATED,
|
|
|
|
EVENT_SERVICE_REGISTERED,
|
|
|
|
EVENT_SERVICE_REMOVED,
|
2020-02-12 18:13:07 +00:00
|
|
|
EVENT_SHOPPING_LIST_UPDATED,
|
2019-03-18 02:13:06 +00:00
|
|
|
EVENT_STATE_CHANGED,
|
|
|
|
EVENT_THEMES_UPDATED,
|
|
|
|
}
|