2020-04-14 18:26:13 +00:00
|
|
|
"""Constants used for LG webOS Smart TV."""
|
2022-01-14 21:48:45 +00:00
|
|
|
import asyncio
|
|
|
|
|
|
|
|
from aiowebostv import WebOsTvCommandError
|
|
|
|
from websockets.exceptions import ConnectionClosed, ConnectionClosedOK
|
2020-04-14 18:26:13 +00:00
|
|
|
|
2022-01-14 21:48:45 +00:00
|
|
|
DOMAIN = "webostv"
|
|
|
|
PLATFORMS = ["media_player"]
|
|
|
|
DATA_CONFIG_ENTRY = "config_entry"
|
|
|
|
DATA_HASS_CONFIG = "hass_config"
|
2020-04-14 18:26:13 +00:00
|
|
|
DEFAULT_NAME = "LG webOS Smart TV"
|
2020-01-27 09:40:48 +00:00
|
|
|
|
2020-04-14 18:26:13 +00:00
|
|
|
ATTR_BUTTON = "button"
|
2022-01-14 21:48:45 +00:00
|
|
|
ATTR_CONFIG_ENTRY_ID = "entry_id"
|
2020-05-27 13:51:39 +00:00
|
|
|
ATTR_PAYLOAD = "payload"
|
2020-01-27 09:40:48 +00:00
|
|
|
ATTR_SOUND_OUTPUT = "sound_output"
|
2020-04-14 18:26:13 +00:00
|
|
|
|
|
|
|
CONF_ON_ACTION = "turn_on_action"
|
|
|
|
CONF_SOURCES = "sources"
|
|
|
|
|
|
|
|
SERVICE_BUTTON = "button"
|
|
|
|
SERVICE_COMMAND = "command"
|
|
|
|
SERVICE_SELECT_SOUND_OUTPUT = "select_sound_output"
|
|
|
|
|
|
|
|
LIVE_TV_APP_ID = "com.webos.app.livetv"
|
|
|
|
|
2022-01-14 21:48:45 +00:00
|
|
|
WEBOSTV_EXCEPTIONS = (
|
|
|
|
OSError,
|
|
|
|
ConnectionClosed,
|
|
|
|
ConnectionClosedOK,
|
|
|
|
ConnectionRefusedError,
|
|
|
|
WebOsTvCommandError,
|
|
|
|
asyncio.TimeoutError,
|
|
|
|
asyncio.CancelledError,
|
|
|
|
)
|