Skip to content

Commit

Permalink
Add ems_power_mode/ems_power settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mletenay committed Jun 17, 2024
1 parent a4b8c7f commit abdfeda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions goodwe/et.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ class ET(Inverter):

Integer("grid_export", 47509, "Grid Export Enabled", "", Kind.GRID),
Integer("grid_export_limit", 47510, "Grid Export Limit", "W", Kind.GRID),
Integer("ems_power_mode", 47511, "EMS Power Mode", "", Kind.BAT),
Integer("ems_power", 47512, "EMS Power", "W", Kind.BAT),

Integer("battery_protocol_code", 47514, "Battery Protocol Code", "", Kind.BAT),

Expand Down
6 changes: 3 additions & 3 deletions tests/test_et.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def test_GW10K_ET_runtime_data(self):
self.assertFalse(self.sensor_map, f"Some sensors were not tested {self.sensor_map}")

def test_GW10K_ET_setting(self):
self.assertEqual(66, len(self.settings()))
self.assertEqual(68, len(self.settings()))
settings = {s.id_: s for s in self.settings()}
self.assertEqual('Timestamp', type(settings.get("time")).__name__)
self.assertEqual('EcoModeV1', type(settings.get("eco_mode_1")).__name__)
Expand Down Expand Up @@ -341,7 +341,7 @@ def test_GW10K_ET_fw819_device_info(self):
self.assertEqual('02041-19-S00', self.arm_firmware)

def test_GW10K_ET_settings_fw819(self):
self.assertEqual(73, len(self.settings()))
self.assertEqual(75, len(self.settings()))
settings = {s.id_: s for s in self.settings()}
self.assertEqual('EcoModeV2', type(settings.get("eco_mode_1")).__name__)
self.assertEqual(None, settings.get("peak_shaving_mode"))
Expand Down Expand Up @@ -382,7 +382,7 @@ def test_GW10K_ET_fw1023_device_info(self):
self.assertEqual('02041-23-S00', self.arm_firmware)

def test_GW10K_ET_setting_fw1023(self):
self.assertEqual(81, len(self.settings()))
self.assertEqual(83, len(self.settings()))
settings = {s.id_: s for s in self.settings()}
self.assertEqual('PeakShavingMode', type(settings.get("peak_shaving_mode")).__name__)

Expand Down

0 comments on commit abdfeda

Please sign in to comment.