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

Classes

class  HikvisionBinarySensor
 
class  HikvisionData
 

Functions

None setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string ATTR_DELAY = "delay"
 
string CONF_IGNORED = "ignored"
 
 CUSTOMIZE_SCHEMA
 
int DEFAULT_DELAY = 0
 
bool DEFAULT_IGNORED = False
 
int DEFAULT_PORT = 80
 
dictionary DEVICE_CLASS_MAP
 
 PLATFORM_SCHEMA
 

Detailed Description

Support for Hikvision event stream events represented as binary sensors.

Function Documentation

◆ setup_platform()

None homeassistant.components.hikvision.binary_sensor.setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the Hikvision binary sensor devices.

Definition at line 92 of file binary_sensor.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 36 of file binary_sensor.py.

◆ ATTR_DELAY

string homeassistant.components.hikvision.binary_sensor.ATTR_DELAY = "delay"

Definition at line 44 of file binary_sensor.py.

◆ CONF_IGNORED

string homeassistant.components.hikvision.binary_sensor.CONF_IGNORED = "ignored"

Definition at line 38 of file binary_sensor.py.

◆ CUSTOMIZE_SCHEMA

homeassistant.components.hikvision.binary_sensor.CUSTOMIZE_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_IGNORED, default=DEFAULT_IGNORED): cv.boolean,
4  vol.Optional(CONF_DELAY, default=DEFAULT_DELAY): cv.positive_int,
5  }
6 )

Definition at line 70 of file binary_sensor.py.

◆ DEFAULT_DELAY

int homeassistant.components.hikvision.binary_sensor.DEFAULT_DELAY = 0

Definition at line 42 of file binary_sensor.py.

◆ DEFAULT_IGNORED

bool homeassistant.components.hikvision.binary_sensor.DEFAULT_IGNORED = False

Definition at line 41 of file binary_sensor.py.

◆ DEFAULT_PORT

int homeassistant.components.hikvision.binary_sensor.DEFAULT_PORT = 80

Definition at line 40 of file binary_sensor.py.

◆ DEVICE_CLASS_MAP

dictionary homeassistant.components.hikvision.binary_sensor.DEVICE_CLASS_MAP
Initial value:
1 = {
2  "Motion": BinarySensorDeviceClass.MOTION,
3  "Line Crossing": BinarySensorDeviceClass.MOTION,
4  "Field Detection": BinarySensorDeviceClass.MOTION,
5  "Tamper Detection": BinarySensorDeviceClass.MOTION,
6  "Shelter Alarm": None,
7  "Disk Full": None,
8  "Disk Error": None,
9  "Net Interface Broken": BinarySensorDeviceClass.CONNECTIVITY,
10  "IP Conflict": BinarySensorDeviceClass.CONNECTIVITY,
11  "Illegal Access": None,
12  "Video Mismatch": None,
13  "Bad Video": None,
14  "PIR Alarm": BinarySensorDeviceClass.MOTION,
15  "Face Detection": BinarySensorDeviceClass.MOTION,
16  "Scene Change Detection": BinarySensorDeviceClass.MOTION,
17  "I/O": None,
18  "Unattended Baggage": BinarySensorDeviceClass.MOTION,
19  "Attended Baggage": BinarySensorDeviceClass.MOTION,
20  "Recording Failure": None,
21  "Exiting Region": BinarySensorDeviceClass.MOTION,
22  "Entering Region": BinarySensorDeviceClass.MOTION,
23 }

Definition at line 46 of file binary_sensor.py.

◆ PLATFORM_SCHEMA

homeassistant.components.hikvision.binary_sensor.PLATFORM_SCHEMA
Initial value:
1 = BINARY_SENSOR_PLATFORM_SCHEMA.extend(
2  {
3  vol.Optional(CONF_NAME): cv.string,
4  vol.Required(CONF_HOST): cv.string,
5  vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
6  vol.Optional(CONF_SSL, default=False): cv.boolean,
7  vol.Required(CONF_USERNAME): cv.string,
8  vol.Required(CONF_PASSWORD): cv.string,
9  vol.Optional(CONF_CUSTOMIZE, default={}): vol.Schema(
10  {cv.string: CUSTOMIZE_SCHEMA}
11  ),
12  }
13 )

Definition at line 77 of file binary_sensor.py.