1
0
mirror of https://github.com/home-assistant/core.git synced 2026-06-02 05:34:15 +01:00
Files
core/homeassistant/components/cast/const.py
T
epenet 676e9c7f29 Migrate Cast to use runtime_data (#168856)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 15:57:29 +02:00

41 lines
1.2 KiB
Python

"""Consts for Cast integration."""
from typing import TYPE_CHECKING, NotRequired, TypedDict
from homeassistant.util.signal_type import SignalType
if TYPE_CHECKING:
from .helpers import ChromecastInfo
DOMAIN = "cast"
# Stores a threading.Lock that is held by the internal pychromecast discovery.
INTERNAL_DISCOVERY_RUNNING_KEY = "cast_discovery_running"
# Dispatcher signal fired with a ChromecastInfo every time we discover a new
# Chromecast or receive it through configuration
SIGNAL_CAST_DISCOVERED: SignalType[ChromecastInfo] = SignalType("cast_discovered")
# Dispatcher signal fired with a ChromecastInfo every time a Chromecast is
# removed
SIGNAL_CAST_REMOVED: SignalType[ChromecastInfo] = SignalType("cast_removed")
# Dispatcher signal fired when a Chromecast should show a Home Assistant Cast view.
SIGNAL_HASS_CAST_SHOW_VIEW: SignalType[
HomeAssistantControllerData, str, str, str | None
] = SignalType("cast_show_view")
CONF_IGNORE_CEC = "ignore_cec"
CONF_KNOWN_HOSTS = "known_hosts"
class HomeAssistantControllerData(TypedDict):
"""Data for creating a HomeAssistantController."""
hass_url: str
hass_uuid: str
client_id: str | None
refresh_token: str
app_id: NotRequired[str]