mirror of
https://github.com/home-assistant/core.git
synced 2025-05-12 09:59:20 +00:00

* Convert amcrest binary sensors from poll to stream - Bump amcrest package to 1.6.0. - For online binary sensor poll camera periodically to test communications in case configuration & usage results in no other communication to camera. - Start a separate thread to call camera's event_stream method since it never returns. - Convert all received events into signals that cause corresponding sensors to update. - Use camera's generic event_channels_happened method to update sensors at startup, and whenever camera comes back online after being unavailable. * Changes per review * Changes per review 2 * Changes per review 3 - Move event stream decoding to amcrest package. - Change name of event processing threads so global counter is no longer required. - Bump amcrest package to 1.7.0.
20 lines
411 B
Python
20 lines
411 B
Python
"""Constants for amcrest component."""
|
|
DOMAIN = "amcrest"
|
|
DATA_AMCREST = DOMAIN
|
|
CAMERAS = "cameras"
|
|
DEVICES = "devices"
|
|
|
|
BINARY_SENSOR_SCAN_INTERVAL_SECS = 60
|
|
CAMERA_WEB_SESSION_TIMEOUT = 10
|
|
COMM_RETRIES = 1
|
|
COMM_TIMEOUT = 6.05
|
|
SENSOR_SCAN_INTERVAL_SECS = 10
|
|
SNAPSHOT_TIMEOUT = 20
|
|
|
|
SERVICE_EVENT = "event"
|
|
SERVICE_UPDATE = "update"
|
|
|
|
SENSOR_DEVICE_CLASS = "class"
|
|
SENSOR_EVENT_CODE = "code"
|
|
SENSOR_NAME = "name"
|