From 427c77b0e7bd364c304f39d5b5c7523167896c3f Mon Sep 17 00:00:00 2001 From: Dave Foster Date: Thu, 16 Jan 2025 11:53:17 +0000 Subject: [PATCH] Add Peak Shaving work mode for H3 & H1 (Gen 2) Adds the Peak Shaving work mode to the select for the H3 inverters and H1 (Gen 2) inverters. See https://github.com/nathanmarlor/foxess_modbus/discussions/699 --- .../entities/entity_descriptions.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/custom_components/foxess_modbus/entities/entity_descriptions.py b/custom_components/foxess_modbus/entities/entity_descriptions.py index 09f6e291..a2688592 100644 --- a/custom_components/foxess_modbus/entities/entity_descriptions.py +++ b/custom_components/foxess_modbus/entities/entity_descriptions.py @@ -2095,12 +2095,26 @@ def _configuration_entities() -> Iterable[EntityFactory]: key="work_mode", address=[ ModbusAddressSpec(input=41000, models=Inv.H1_G1 | Inv.KH_PRE119), - ModbusAddressSpec(holding=41000, models=Inv.H1_G1 | Inv.H1_G2 | Inv.KH_119 | Inv.H3_SET), + ModbusAddressSpec(holding=41000, models=Inv.H1_G1 | Inv.KH_119), ], name="Work Mode", options_map={0: "Self Use", 1: "Feed-in First", 2: "Back-up"}, ) + yield ModbusWorkModeSelectDescription( + key="work_mode", + address=[ + ModbusAddressSpec(holding=49203, models=Inv.H3_SET | Inv.H1_G2), + ], + name="Work Mode", + options_map={ + 0: "Self Use", + 1: "Feed-in First", + 2: "Back-up", + 4: "Peak Shaving", + }, + ) + yield ModbusWorkModeSelectDescription( key="work_mode", address=[