2017-10-18 05:00:59 +00:00
|
|
|
"""Constants for Google Assistant."""
|
|
|
|
DOMAIN = 'google_assistant'
|
|
|
|
|
|
|
|
GOOGLE_ASSISTANT_API_ENDPOINT = '/api/google_assistant'
|
|
|
|
|
|
|
|
ATTR_GOOGLE_ASSISTANT = 'google_assistant'
|
|
|
|
ATTR_GOOGLE_ASSISTANT_NAME = 'google_assistant_name'
|
2017-11-01 03:38:34 +00:00
|
|
|
ATTR_GOOGLE_ASSISTANT_TYPE = 'google_assistant_type'
|
2017-10-18 05:00:59 +00:00
|
|
|
|
|
|
|
CONF_EXPOSE_BY_DEFAULT = 'expose_by_default'
|
|
|
|
CONF_EXPOSED_DOMAINS = 'exposed_domains'
|
|
|
|
CONF_PROJECT_ID = 'project_id'
|
|
|
|
CONF_ACCESS_TOKEN = 'access_token'
|
|
|
|
CONF_CLIENT_ID = 'client_id'
|
|
|
|
CONF_ALIASES = 'aliases'
|
2017-11-13 16:32:23 +00:00
|
|
|
CONF_AGENT_USER_ID = 'agent_user_id'
|
|
|
|
CONF_API_KEY = 'api_key'
|
2017-10-18 05:00:59 +00:00
|
|
|
|
|
|
|
DEFAULT_EXPOSE_BY_DEFAULT = True
|
|
|
|
DEFAULT_EXPOSED_DOMAINS = [
|
2017-11-01 14:44:59 +00:00
|
|
|
'switch', 'light', 'group', 'media_player', 'fan', 'cover', 'climate'
|
2017-10-18 05:00:59 +00:00
|
|
|
]
|
2017-11-01 14:44:59 +00:00
|
|
|
CLIMATE_SUPPORTED_MODES = {'heat', 'cool', 'off', 'on', 'heatcool'}
|
2017-10-18 05:00:59 +00:00
|
|
|
|
|
|
|
PREFIX_TRAITS = 'action.devices.traits.'
|
|
|
|
TRAIT_ONOFF = PREFIX_TRAITS + 'OnOff'
|
|
|
|
TRAIT_BRIGHTNESS = PREFIX_TRAITS + 'Brightness'
|
|
|
|
TRAIT_RGB_COLOR = PREFIX_TRAITS + 'ColorSpectrum'
|
|
|
|
TRAIT_COLOR_TEMP = PREFIX_TRAITS + 'ColorTemperature'
|
|
|
|
TRAIT_SCENE = PREFIX_TRAITS + 'Scene'
|
2017-11-01 14:44:59 +00:00
|
|
|
TRAIT_TEMPERATURE_SETTING = PREFIX_TRAITS + 'TemperatureSetting'
|
2017-10-18 05:00:59 +00:00
|
|
|
|
|
|
|
PREFIX_COMMANDS = 'action.devices.commands.'
|
|
|
|
COMMAND_ONOFF = PREFIX_COMMANDS + 'OnOff'
|
|
|
|
COMMAND_BRIGHTNESS = PREFIX_COMMANDS + 'BrightnessAbsolute'
|
|
|
|
COMMAND_COLOR = PREFIX_COMMANDS + 'ColorAbsolute'
|
|
|
|
COMMAND_ACTIVATESCENE = PREFIX_COMMANDS + 'ActivateScene'
|
2017-11-01 14:44:59 +00:00
|
|
|
COMMAND_THERMOSTAT_TEMPERATURE_SETPOINT = (
|
|
|
|
PREFIX_COMMANDS + 'ThermostatTemperatureSetpoint')
|
|
|
|
COMMAND_THERMOSTAT_TEMPERATURE_SET_RANGE = (
|
|
|
|
PREFIX_COMMANDS + 'ThermostatTemperatureSetRange')
|
|
|
|
COMMAND_THERMOSTAT_SET_MODE = PREFIX_COMMANDS + 'ThermostatSetMode'
|
2017-10-18 05:00:59 +00:00
|
|
|
|
|
|
|
PREFIX_TYPES = 'action.devices.types.'
|
|
|
|
TYPE_LIGHT = PREFIX_TYPES + 'LIGHT'
|
|
|
|
TYPE_SWITCH = PREFIX_TYPES + 'SWITCH'
|
|
|
|
TYPE_SCENE = PREFIX_TYPES + 'SCENE'
|
2017-11-01 14:44:59 +00:00
|
|
|
TYPE_THERMOSTAT = PREFIX_TYPES + 'THERMOSTAT'
|
2017-11-13 16:32:23 +00:00
|
|
|
|
|
|
|
SERVICE_REQUEST_SYNC = 'request_sync'
|
|
|
|
HOMEGRAPH_URL = 'https://homegraph.googleapis.com/'
|
|
|
|
REQUEST_SYNC_BASE_URL = HOMEGRAPH_URL + 'v1/devices:requestSync'
|