Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the Verisure integration."""
2 
3 from datetime import timedelta
4 import logging
5 
6 from homeassistant.components.alarm_control_panel import AlarmControlPanelState
7 
8 DOMAIN = "verisure"
9 
10 LOGGER = logging.getLogger(__package__)
11 
12 CONF_GIID = "giid"
13 CONF_LOCK_CODE_DIGITS = "lock_code_digits"
14 CONF_LOCK_DEFAULT_CODE = "lock_default_code"
15 
16 DEFAULT_SCAN_INTERVAL = timedelta(minutes=1)
17 DEFAULT_LOCK_CODE_DIGITS = 4
18 
19 SERVICE_CAPTURE_SMARTCAM = "capture_smartcam"
20 SERVICE_DISABLE_AUTOLOCK = "disable_autolock"
21 SERVICE_ENABLE_AUTOLOCK = "enable_autolock"
22 
23 # Mapping of device types to a human readable name
24 DEVICE_TYPE_NAME = {
25  "CAMERAPIR2": "Camera detector",
26  "HOMEPAD1": "VoiceBox",
27  "HUMIDITY1": "Climate sensor",
28  "PIR2": "Camera detector",
29  "SIREN1": "Siren",
30  "SMARTCAMERA1": "SmartCam",
31  "SMOKE2": "Smoke detector",
32  "SMOKE3": "Smoke detector",
33  "VOICEBOX1": "VoiceBox",
34  "WATER1": "Water detector",
35  "SMOKE": "Smoke detector",
36  "SIREN": "Siren",
37  "VOICEBOX": "VoiceBox",
38 }
39 
40 ALARM_STATE_TO_HA = {
41  "DISARMED": AlarmControlPanelState.DISARMED,
42  "ARMED_HOME": AlarmControlPanelState.ARMED_HOME,
43  "ARMED_AWAY": AlarmControlPanelState.ARMED_AWAY,
44  "PENDING": AlarmControlPanelState.PENDING,
45 }