mirror of
https://github.com/home-assistant/core.git
synced 2026-08-29 18:25:07 -05:00
60 lines
1.6 KiB
Python
60 lines
1.6 KiB
Python
"""Constants used by vizio component."""
|
|
|
|
from vizaio import DeviceType
|
|
|
|
from homeassistant.components.media_player import (
|
|
MediaPlayerDeviceClass,
|
|
MediaPlayerEntityFeature,
|
|
)
|
|
|
|
CONF_ADDITIONAL_CONFIGS = "additional_configs"
|
|
CONF_APP_ID = "APP_ID"
|
|
CONF_APPS = "apps"
|
|
CONF_APPS_TO_INCLUDE_OR_EXCLUDE = "apps_to_include_or_exclude"
|
|
CONF_CONFIG = "config"
|
|
CONF_INCLUDE_OR_EXCLUDE = "include_or_exclude"
|
|
CONF_NAME_SPACE = "NAME_SPACE"
|
|
CONF_MESSAGE = "MESSAGE"
|
|
CONF_VOLUME_STEP = "volume_step"
|
|
|
|
DEFAULT_NAME = "Vizio SmartCast"
|
|
DEFAULT_TIMEOUT = 8
|
|
DEFAULT_VOLUME_STEP = 1
|
|
|
|
DEVICE_ID = "pyvizio"
|
|
|
|
DOMAIN = "vizio"
|
|
|
|
COMMON_SUPPORTED_COMMANDS = (
|
|
MediaPlayerEntityFeature.PAUSE
|
|
| MediaPlayerEntityFeature.PLAY
|
|
| MediaPlayerEntityFeature.SELECT_SOURCE
|
|
| MediaPlayerEntityFeature.TURN_ON
|
|
| MediaPlayerEntityFeature.TURN_OFF
|
|
| MediaPlayerEntityFeature.VOLUME_MUTE
|
|
| MediaPlayerEntityFeature.VOLUME_SET
|
|
| MediaPlayerEntityFeature.VOLUME_STEP
|
|
)
|
|
|
|
SUPPORTED_COMMANDS = {
|
|
MediaPlayerDeviceClass.SPEAKER: COMMON_SUPPORTED_COMMANDS,
|
|
MediaPlayerDeviceClass.TV: (
|
|
COMMON_SUPPORTED_COMMANDS
|
|
| MediaPlayerEntityFeature.NEXT_TRACK
|
|
| MediaPlayerEntityFeature.PREVIOUS_TRACK
|
|
),
|
|
}
|
|
|
|
VIZIO_SOUND_MODE = "eq"
|
|
VIZIO_AUDIO_SETTINGS = "audio"
|
|
VIZIO_MUTE_ON = "on"
|
|
VIZIO_VOLUME = "volume"
|
|
VIZIO_MUTE = "mute"
|
|
|
|
# Maps HA device class to the vizaio device type so changes to vizaio's
|
|
# DeviceType values never require a config entry migration.
|
|
VIZIO_DEVICE_CLASSES = {
|
|
MediaPlayerDeviceClass.SPEAKER: DeviceType.SOUNDBAR,
|
|
MediaPlayerDeviceClass.TV: DeviceType.TV,
|
|
}
|