Skip to content

Commit 710842c

Browse files
Update victron_mqtt to 2026.6.1 (#429)
## Changes - use LOW_BATTERY device class - skip Ah unit for translation file ## Contributors @tomer-w Co-authored-by: tomer-w <57483589+tomer-w@users.noreply.github.com>
1 parent d1136fc commit 710842c

6 files changed

Lines changed: 133 additions & 6 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Vendored third-party packages."""
22

3-
VICTRON_MQTT_VERSION = "2026.5.13"
3+
VICTRON_MQTT_VERSION = "2026.6.1"

custom_components/victron_mqtt/_vendor/victron_mqtt/_victron_formulas.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,18 @@ def schedule_charge_enabled_set(
9393
return enabled, None
9494

9595

96+
def ess_batterylife_state(
97+
depends_on: dict[str, Metric], _transient_state: FormulaTransientState | None
98+
) -> tuple[ESSState | None, None]:
99+
"""Pass through the BatteryLife state from the hidden SELECT as a read-only SENSOR."""
100+
metric = next(iter(depends_on.values()))
101+
if metric.value is None:
102+
return None, None
103+
if isinstance(metric.value, ESSState):
104+
return metric.value, None
105+
return ESSState.from_code(int(metric.value)), None
106+
107+
96108
def gps_location(
97109
depends_on: dict[str, Metric],
98110
_transient_state: FormulaTransientState | None,

custom_components/victron_mqtt/_vendor/victron_mqtt/_victron_topics.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@
14961496
name="Low battery alarm",
14971497
value_type=ValueType.ENUM,
14981498
enum=GenericAlarmEnum,
1499-
metric_type=MetricType.PROBLEM,
1499+
metric_type=MetricType.LOW_BATTERY,
15001500
),
15011501
TopicDescriptor(
15021502
topic="N/{installation_id}/meteo/{device_id}/BatteryVoltage",
@@ -1610,6 +1610,27 @@
16101610
name="AC-out-{output} voltage on {phase}",
16111611
metric_type=MetricType.VOLTAGE,
16121612
),
1613+
TopicDescriptor(
1614+
topic="N/{installation_id}/multi/{device_id}/Ac/Out/{phase}/I",
1615+
message_type=MetricKind.SENSOR,
1616+
short_id="multi_acout_current_{phase}",
1617+
name="Output current on {phase}",
1618+
metric_type=MetricType.CURRENT,
1619+
),
1620+
TopicDescriptor(
1621+
topic="N/{installation_id}/multi/{device_id}/Ac/Out/{phase}/P",
1622+
message_type=MetricKind.SENSOR,
1623+
short_id="multi_acout_power_{phase}",
1624+
name="Output power on {phase}",
1625+
metric_type=MetricType.POWER,
1626+
),
1627+
TopicDescriptor(
1628+
topic="N/{installation_id}/multi/{device_id}/Ac/Out/{phase}/V",
1629+
message_type=MetricKind.SENSOR,
1630+
short_id="multi_acout_voltage_{phase}",
1631+
name="Output voltage on {phase}",
1632+
metric_type=MetricType.VOLTAGE,
1633+
),
16131634
TopicDescriptor(
16141635
topic="N/{installation_id}/multi/{device_id}/Dc/0/Temperature",
16151636
message_type=MetricKind.SENSOR,
@@ -2000,7 +2021,8 @@
20002021
hidden=True,
20012022
),
20022023
TopicDescriptor(
2003-
topic="N/{installation_id}/settings/{device_id}/Settings/CGwacs/BatteryLife/State",
2024+
topic="$$func/system/ess_batterylife_state",
2025+
depends_on=["system_ess_batterylife_state_full"],
20042026
message_type=MetricKind.SENSOR,
20052027
short_id="system_ess_batterylife_state_sensor",
20062028
name="ESS BatteryLife state",

custom_components/victron_mqtt/_vendor/victron_mqtt/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class MetricType(Enum):
6363
PROBLEM = "problem"
6464
CONNECTIVITY = "connectivity"
6565
RESTART = "restart"
66+
LOW_BATTERY = "low_battery"
6667

6768

6869
class ValueType(Enum):

custom_components/victron_mqtt/translations/en.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,9 @@
13881388
"multi_acin_voltage_phase": {
13891389
"name": "Voltage on {phase}"
13901390
},
1391+
"multi_acout_current_phase": {
1392+
"name": "Output current on {phase}"
1393+
},
13911394
"multi_acout_output_current_phase": {
13921395
"name": "AC-out-{output} current on {phase}"
13931396
},
@@ -1397,12 +1400,18 @@
13971400
"multi_acout_output_voltage_phase": {
13981401
"name": "AC-out-{output} voltage on {phase}"
13991402
},
1403+
"multi_acout_power_phase": {
1404+
"name": "Output power on {phase}"
1405+
},
14001406
"multi_acout_to_acin1": {
14011407
"name": "AC-out to AC-in-1"
14021408
},
14031409
"multi_acout_to_inverter": {
14041410
"name": "AC-out to inverter"
14051411
},
1412+
"multi_acout_voltage_phase": {
1413+
"name": "Output voltage on {phase}"
1414+
},
14061415
"multi_active_input": {
14071416
"name": "Active AC input",
14081417
"state": {

victron_mqtt.json

Lines changed: 86 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5098,6 +5098,87 @@
50985098
"hidden": false,
50995099
"sub_device_key": null
51005100
},
5101+
{
5102+
"topic": "N/{installation_id}/multi/{device_id}/Ac/Out/{phase}/I",
5103+
"message_type": "MetricKind.SENSOR",
5104+
"short_id": "multi_acout_current_{phase}",
5105+
"name": "Output current on {phase}",
5106+
"unit_of_measurement": "A",
5107+
"metric_type": "MetricType.CURRENT",
5108+
"metric_nature": "MetricNature.MEASUREMENT",
5109+
"value_type": "ValueType.FLOAT",
5110+
"precision": 1,
5111+
"enum": null,
5112+
"min_max_range": "RangeType.STATIC",
5113+
"min": null,
5114+
"max": null,
5115+
"step": null,
5116+
"is_adjustable_suffix": null,
5117+
"output_type": null,
5118+
"labels": null,
5119+
"key_values": {},
5120+
"experimental": false,
5121+
"depends_on": [],
5122+
"generic_name": "Output current on {phase}",
5123+
"is_formula": false,
5124+
"main_topic": false,
5125+
"hidden": false,
5126+
"sub_device_key": null
5127+
},
5128+
{
5129+
"topic": "N/{installation_id}/multi/{device_id}/Ac/Out/{phase}/P",
5130+
"message_type": "MetricKind.SENSOR",
5131+
"short_id": "multi_acout_power_{phase}",
5132+
"name": "Output power on {phase}",
5133+
"unit_of_measurement": "W",
5134+
"metric_type": "MetricType.POWER",
5135+
"metric_nature": "MetricNature.MEASUREMENT",
5136+
"value_type": "ValueType.FLOAT",
5137+
"precision": 1,
5138+
"enum": null,
5139+
"min_max_range": "RangeType.STATIC",
5140+
"min": null,
5141+
"max": null,
5142+
"step": null,
5143+
"is_adjustable_suffix": null,
5144+
"output_type": null,
5145+
"labels": null,
5146+
"key_values": {},
5147+
"experimental": false,
5148+
"depends_on": [],
5149+
"generic_name": "Output power on {phase}",
5150+
"is_formula": false,
5151+
"main_topic": false,
5152+
"hidden": false,
5153+
"sub_device_key": null
5154+
},
5155+
{
5156+
"topic": "N/{installation_id}/multi/{device_id}/Ac/Out/{phase}/V",
5157+
"message_type": "MetricKind.SENSOR",
5158+
"short_id": "multi_acout_voltage_{phase}",
5159+
"name": "Output voltage on {phase}",
5160+
"unit_of_measurement": "V",
5161+
"metric_type": "MetricType.VOLTAGE",
5162+
"metric_nature": "MetricNature.MEASUREMENT",
5163+
"value_type": "ValueType.FLOAT",
5164+
"precision": 3,
5165+
"enum": null,
5166+
"min_max_range": "RangeType.STATIC",
5167+
"min": null,
5168+
"max": null,
5169+
"step": null,
5170+
"is_adjustable_suffix": null,
5171+
"output_type": null,
5172+
"labels": null,
5173+
"key_values": {},
5174+
"experimental": false,
5175+
"depends_on": [],
5176+
"generic_name": "Output voltage on {phase}",
5177+
"is_formula": false,
5178+
"main_topic": false,
5179+
"hidden": false,
5180+
"sub_device_key": null
5181+
},
51015182
{
51025183
"topic": "N/{installation_id}/multi/{device_id}/Dc/0/Temperature",
51035184
"message_type": "MetricKind.SENSOR",
@@ -6427,7 +6508,7 @@
64276508
"sub_device_key": null
64286509
},
64296510
{
6430-
"topic": "N/{installation_id}/settings/{device_id}/Settings/CGwacs/BatteryLife/State",
6511+
"topic": "$$func/system/ess_batterylife_state",
64316512
"message_type": "MetricKind.SENSOR",
64326513
"short_id": "system_ess_batterylife_state_sensor",
64336514
"name": "ESS BatteryLife state",
@@ -6446,9 +6527,11 @@
64466527
"labels": null,
64476528
"key_values": {},
64486529
"experimental": false,
6449-
"depends_on": [],
6530+
"depends_on": [
6531+
"system_ess_batterylife_state_full"
6532+
],
64506533
"generic_name": "ESS BatteryLife state",
6451-
"is_formula": false,
6534+
"is_formula": true,
64526535
"main_topic": false,
64536536
"hidden": false,
64546537
"sub_device_key": null

0 commit comments

Comments
 (0)