Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the DSMR integration."""
2 
3 from __future__ import annotations
4 
5 import logging
6 
7 from homeassistant.const import Platform
8 
9 DOMAIN = "dsmr"
10 
11 LOGGER = logging.getLogger(__package__)
12 
13 PLATFORMS = [Platform.SENSOR]
14 CONF_DSMR_VERSION = "dsmr_version"
15 CONF_TIME_BETWEEN_UPDATE = "time_between_update"
16 
17 CONF_SERIAL_ID = "serial_id"
18 CONF_SERIAL_ID_GAS = "serial_id_gas"
19 
20 DEFAULT_DSMR_VERSION = "2.2"
21 DEFAULT_PORT = "/dev/ttyUSB0"
22 DEFAULT_PRECISION = 3
23 DEFAULT_RECONNECT_INTERVAL = 30
24 DEFAULT_TIME_BETWEEN_UPDATE = 30
25 
26 DEVICE_NAME_ELECTRICITY = "Electricity Meter"
27 DEVICE_NAME_GAS = "Gas Meter"
28 DEVICE_NAME_WATER = "Water Meter"
29 DEVICE_NAME_HEAT = "Heat Meter"
30 
31 DSMR_VERSIONS = {"2.2", "4", "5", "5B", "5L", "5S", "Q3D"}
32 
33 DSMR_PROTOCOL = "dsmr_protocol"
34 RFXTRX_DSMR_PROTOCOL = "rfxtrx_dsmr_protocol"