forked from wlcrs/huawei_solar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconst.py
27 lines (20 loc) · 777 Bytes
/
const.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Constants for the Huawei Solar integration."""
from datetime import timedelta
DOMAIN = "huawei_solar"
DEFAULT_PORT = 502
DEFAULT_SLAVE_ID = 0
DATA_MODBUS_CLIENT = "client"
DATA_SLAVE_IDS = "slave_ids"
DATA_DEVICE_INFOS = "device_infos"
DATA_UPDATE_COORDINATORS = "update_coordinators"
CONF_SLAVE_IDS = "slave_ids"
LEGACY_CONF_SLAVE = "slave"
IDENTIFIER_SLAVE_ID = "slave_id"
IDENTIFIER_DEVICE_TYPE = "device_type"
DEVICE_TYPE_INVERTER = "inverter"
DEVICE_TYPE_ENERGY_STORAGE = "energy_storage"
DEVICE_TYPE_SINGLE_PHASE_POWER_METER = "single_phase_power_meter"
DEVICE_TYPE_THREE_PHASE_POWER_METER = "three_phase_power_meter"
BATTERY_UPDATE_INTERVAL = timedelta(seconds=30)
INVERTER_UPDATE_INTERVAL = timedelta(seconds=30)
METER_UPDATE_INTERVAL = timedelta(seconds=15)