Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.amcrest.binary_sensor Namespace Reference

Classes

class  AmcrestBinarySensor
 
class  AmcrestSensorEntityDescription
 

Functions

None async_setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback async_add_entities, DiscoveryInfoType|None discovery_info=None)
 
list[str] check_binary_sensors (list[str] value)
 

Variables

dictionary _AUDIO_DETECTED_EVENT_CODES = {"AudioMutation", "AudioIntensity"}
 
string _AUDIO_DETECTED_KEY = "audio_detected"
 
string _AUDIO_DETECTED_NAME = "Audio Detected"
 
string _AUDIO_DETECTED_POLLED_KEY = "audio_detected_polled"
 
string _CROSSLINE_DETECTED_EVENT_CODE = "CrossLineDetection"
 
string _CROSSLINE_DETECTED_KEY = "crossline_detected"
 
string _CROSSLINE_DETECTED_NAME = "CrossLine Detected"
 
string _CROSSLINE_DETECTED_POLLED_KEY = "crossline_detected_polled"
 
list _EXCLUSIVE_OPTIONS
 
 _LOGGER = logging.getLogger(__name__)
 
string _MOTION_DETECTED_EVENT_CODE = "VideoMotion"
 
string _MOTION_DETECTED_KEY = "motion_detected"
 
string _MOTION_DETECTED_NAME = "Motion Detected"
 
string _MOTION_DETECTED_POLLED_KEY = "motion_detected_polled"
 
string _ONLINE_KEY = "online"
 
 _ONLINE_SCAN_INTERVAL = timedelta(seconds=60 - BINARY_SENSOR_SCAN_INTERVAL_SECS)
 
string _UPDATE_MSG = "Updating %s binary sensor"
 
list BINARY_SENSOR_KEYS = [description.key for description in BINARY_SENSORS]
 
 SCAN_INTERVAL = timedelta(seconds=BINARY_SENSOR_SCAN_INTERVAL_SECS)
 

Detailed Description

Support for Amcrest IP camera binary sensors.

Function Documentation

◆ async_setup_platform()

None homeassistant.components.amcrest.binary_sensor.async_setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  async_add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up a binary sensor for an Amcrest IP Camera.

Definition at line 136 of file binary_sensor.py.

◆ check_binary_sensors()

list[str] homeassistant.components.amcrest.binary_sensor.check_binary_sensors ( list[str]  value)
Validate binary sensor configurations.

Definition at line 126 of file binary_sensor.py.

Variable Documentation

◆ _AUDIO_DETECTED_EVENT_CODES

dictionary homeassistant.components.amcrest.binary_sensor._AUDIO_DETECTED_EVENT_CODES = {"AudioMutation", "AudioIntensity"}
private

Definition at line 55 of file binary_sensor.py.

◆ _AUDIO_DETECTED_KEY

string homeassistant.components.amcrest.binary_sensor._AUDIO_DETECTED_KEY = "audio_detected"
private

Definition at line 52 of file binary_sensor.py.

◆ _AUDIO_DETECTED_NAME

string homeassistant.components.amcrest.binary_sensor._AUDIO_DETECTED_NAME = "Audio Detected"
private

Definition at line 54 of file binary_sensor.py.

◆ _AUDIO_DETECTED_POLLED_KEY

string homeassistant.components.amcrest.binary_sensor._AUDIO_DETECTED_POLLED_KEY = "audio_detected_polled"
private

Definition at line 53 of file binary_sensor.py.

◆ _CROSSLINE_DETECTED_EVENT_CODE

string homeassistant.components.amcrest.binary_sensor._CROSSLINE_DETECTED_EVENT_CODE = "CrossLineDetection"
private

Definition at line 60 of file binary_sensor.py.

◆ _CROSSLINE_DETECTED_KEY

string homeassistant.components.amcrest.binary_sensor._CROSSLINE_DETECTED_KEY = "crossline_detected"
private

Definition at line 57 of file binary_sensor.py.

◆ _CROSSLINE_DETECTED_NAME

string homeassistant.components.amcrest.binary_sensor._CROSSLINE_DETECTED_NAME = "CrossLine Detected"
private

Definition at line 59 of file binary_sensor.py.

◆ _CROSSLINE_DETECTED_POLLED_KEY

string homeassistant.components.amcrest.binary_sensor._CROSSLINE_DETECTED_POLLED_KEY = "crossline_detected_polled"
private

Definition at line 58 of file binary_sensor.py.

◆ _EXCLUSIVE_OPTIONS

list homeassistant.components.amcrest.binary_sensor._EXCLUSIVE_OPTIONS
private
Initial value:
1 = [
2  {_AUDIO_DETECTED_KEY, _AUDIO_DETECTED_POLLED_KEY},
3  {_MOTION_DETECTED_KEY, _MOTION_DETECTED_POLLED_KEY},
4  {_CROSSLINE_DETECTED_KEY, _CROSSLINE_DETECTED_POLLED_KEY},
5 ]

Definition at line 117 of file binary_sensor.py.

◆ _LOGGER

homeassistant.components.amcrest.binary_sensor._LOGGER = logging.getLogger(__name__)
private

Definition at line 47 of file binary_sensor.py.

◆ _MOTION_DETECTED_EVENT_CODE

string homeassistant.components.amcrest.binary_sensor._MOTION_DETECTED_EVENT_CODE = "VideoMotion"
private

Definition at line 65 of file binary_sensor.py.

◆ _MOTION_DETECTED_KEY

string homeassistant.components.amcrest.binary_sensor._MOTION_DETECTED_KEY = "motion_detected"
private

Definition at line 62 of file binary_sensor.py.

◆ _MOTION_DETECTED_NAME

string homeassistant.components.amcrest.binary_sensor._MOTION_DETECTED_NAME = "Motion Detected"
private

Definition at line 64 of file binary_sensor.py.

◆ _MOTION_DETECTED_POLLED_KEY

string homeassistant.components.amcrest.binary_sensor._MOTION_DETECTED_POLLED_KEY = "motion_detected_polled"
private

Definition at line 63 of file binary_sensor.py.

◆ _ONLINE_KEY

string homeassistant.components.amcrest.binary_sensor._ONLINE_KEY = "online"
private

Definition at line 67 of file binary_sensor.py.

◆ _ONLINE_SCAN_INTERVAL

homeassistant.components.amcrest.binary_sensor._ONLINE_SCAN_INTERVAL = timedelta(seconds=60 - BINARY_SENSOR_SCAN_INTERVAL_SECS)
private

Definition at line 50 of file binary_sensor.py.

◆ _UPDATE_MSG

string homeassistant.components.amcrest.binary_sensor._UPDATE_MSG = "Updating %s binary sensor"
private

Definition at line 123 of file binary_sensor.py.

◆ BINARY_SENSOR_KEYS

list homeassistant.components.amcrest.binary_sensor.BINARY_SENSOR_KEYS = [description.key for description in BINARY_SENSORS]

Definition at line 116 of file binary_sensor.py.

◆ SCAN_INTERVAL

homeassistant.components.amcrest.binary_sensor.SCAN_INTERVAL = timedelta(seconds=BINARY_SENSOR_SCAN_INTERVAL_SECS)

Definition at line 49 of file binary_sensor.py.