From 0b5906660b7ff45fbd80419bdf24e7fe84653a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4umler?= Date: Fri, 18 Aug 2023 18:22:26 +0200 Subject: [PATCH] Add operating_status (#124) (#125) --- pysma/definitions.py | 10 +++++++++- tests/__init__.py | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pysma/definitions.py b/pysma/definitions.py index 6801168..1295f3c 100644 --- a/pysma/definitions.py +++ b/pysma/definitions.py @@ -19,7 +19,14 @@ l10n_translate=True, enabled=False, ) - +#: Operating status +operating_status = Sensor( + "6180_08412B00", + "operating_status", + path=JMESPATHS_TAG, + l10n_translate=True, + enabled=False, +) # Status - Operation - Inverter #: General operating status inverter_condition = Sensor( @@ -544,6 +551,7 @@ inverter_power_limit, inverter_system_init, operating_status_general, + operating_status, power_l1, power_l2, power_l3, diff --git a/tests/__init__.py b/tests/__init__.py index aa3d93b..47a507c 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -4598,7 +4598,7 @@ def mock_aioresponse(): } } }, - 47, + 48, id="STP 10.0 SE, no energy meter, no optimizers", ), pytest.param( @@ -5631,7 +5631,7 @@ def mock_aioresponse(): } } }, - 68, + 69, id="STP 6.0 SE, with energy meter, no optimizers", ), pytest.param( @@ -6156,7 +6156,7 @@ def mock_aioresponse(): } } }, - 66, + 67, id="STP 10.0 SE, with energy meter, no optimizers", ), pytest.param(