Skip to content

Commit 16a21e1

Browse files
authored
Update const.py
1 parent c306177 commit 16a21e1

File tree

1 file changed

+19
-13
lines changed
  • custom_components/apsystems_ecu_proxy

1 file changed

+19
-13
lines changed

custom_components/apsystems_ecu_proxy/const.py

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,6 @@
44

55
DOMAIN = "apsystems_ecu_proxy"
66

7-
# Max age of message (in seconds) to process
8-
MESSAGE_IGNORE_AGE = 1800
9-
10-
# Max summation stub time to add for new period - see code in summation_calculation method in
11-
# sensor.py. Added if no messages recieved for sometime due to inverter shutdown.
12-
MAX_STUB_INTERVAL = 300
13-
14-
# Timeout to set value of no_update_value to sensors if no update received
15-
NO_UPDATE_TIMEOUT = 600
16-
17-
# Used to prevent sending data to EMA for testing purposes. Set to false during testing.
18-
SEND_TO_EMA = True
19-
207
ATTR_TIMESTAMP = "timestamp"
218
ATTR_VALUE_IF_NO_UPDATE = "value_if_no_update"
229
ATTR_SUMMATION_PERIOD = "summation_period"
@@ -36,8 +23,27 @@
3623
DCVOLTAGE_ICON = "mdi:current-dc"
3724
POWER_ICON = "mdi:power"
3825

26+
# Constants for data
3927
SOCKET_PORTS = [8995, 8996, 8997]
4028
EMA_HOST = "3.67.1.32"
29+
# Max age of message (in seconds) to process
30+
MESSAGE_IGNORE_AGE = 1800
31+
# Max summation stub time to add for new period - see code in summation_calculation method in
32+
# sensor.py. Added if no messages recieved for sometime due to inverter shutdown.
33+
MAX_STUB_INTERVAL = 300
34+
# Timeout to set value of no_update_value to sensors if no update received
35+
NO_UPDATE_TIMEOUT = 600
36+
# Used to prevent sending data to EMA for testing purposes. Set to false during testing.
37+
SEND_TO_EMA = True
38+
39+
#Constants for config flow
40+
KEYS = [
41+
"ema_host",
42+
"message_ignore_age",
43+
"max_stub_interval",
44+
"no_update_timeout",
45+
"send_to_ema"
46+
]
4147

4248

4349
class SummationPeriod(StrEnum):

0 commit comments

Comments
 (0)