* Add an entity service for saving nest event related snapshots Add an entity service `nest.snapshot_event` for recording camera event related media to disk. This is based on `camera.snapshot` but takes in a parameter for a Nest API event_id. PR #58299 adds `nest_event_id` to events published by nest so that they can be hooked up to this service for capturing events. Future related work includes: - Height & Width parameters for the rendered image - Support video clips for new battery cameras - An API for proxying media related to events, separate from the camera image thumbnail - A Nest MediaSource for browsing media related to events * Revert debugging information * Add test coverage for OSError failure case * Add service description for nest snapshot service * Reduce unnecessary diffs. * Sort nest camera imports * Remove unnecessary if block in snapshot
26 lines
753 B
Python
26 lines
753 B
Python
"""Constants used by the Nest component."""
|
|
|
|
DOMAIN = "nest"
|
|
DATA_SDM = "sdm"
|
|
DATA_SUBSCRIBER = "subscriber"
|
|
DATA_NEST_CONFIG = "nest_config"
|
|
|
|
CONF_PROJECT_ID = "project_id"
|
|
CONF_SUBSCRIBER_ID = "subscriber_id"
|
|
CONF_CLOUD_PROJECT_ID = "cloud_project_id"
|
|
|
|
SIGNAL_NEST_UPDATE = "nest_update"
|
|
|
|
# For the Google Nest Device Access API
|
|
OAUTH2_AUTHORIZE = (
|
|
"https://nestservices.google.com/partnerconnections/{project_id}/auth"
|
|
)
|
|
OAUTH2_TOKEN = "https://www.googleapis.com/oauth2/v4/token"
|
|
SDM_SCOPES = [
|
|
"https://www.googleapis.com/auth/sdm.service",
|
|
"https://www.googleapis.com/auth/pubsub",
|
|
]
|
|
API_URL = "https://smartdevicemanagement.googleapis.com/v1"
|
|
OOB_REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"
|
|
|
|
SERVICE_SNAPSHOT_EVENT = "snapshot_event"
|