report alarm and fault bitfield to ha (#204)

* report alarm and fault bitfield to home assistant

* initial verson of message builder for SolarmanV5

- for SolarmaV5 we build he param field for the
  device and inverter message from the internal
  database
- added param description to the info table
  for constant values, which are not parsed and
  stored in internal database

* define constants for often used format strings

* update changelog
This commit is contained in:
Stefan Allius
2024-11-02 15:09:10 +01:00
committed by GitHub
parent 9b22fe354c
commit 78a35b5513
8 changed files with 328 additions and 70 deletions

View File

@@ -501,10 +501,10 @@ def test_new_data_types(inv_data_new):
else:
assert False
assert tests==15
assert tests==5
assert json.dumps(i.db['inverter']) == json.dumps({"Manufacturer": 0})
assert json.dumps(i.db['input']) == json.dumps({"pv1": {}})
assert json.dumps(i.db['events']) == json.dumps({"401_": 0, "404_": 0, "405_": 0, "408_": 0, "409_No_Utility": 0, "406_": 0, "416_": 0})
assert json.dumps(i.db['events']) == json.dumps({"Inverter_Alarm": 0, "Inverter_Fault": 0})
def test_invalid_data_type(invalid_data_seq):
i = InfosG3()