[rpi] Add powerfactor and event_count decoder for HM300, HM350, HM400

Without event_count program crashes immediately in __main__.py line 233.
This commit is contained in:
Betacentauri 2023-04-29 14:11:18 +02:00
parent ac207e0d37
commit 2005348f54

View file

@ -515,9 +515,17 @@ class Hm300Decode0B(StatusResponse):
""" reactive power """
return self.unpack('>H', 20)[0]/10
@property
def powerfactor(self):
""" Powerfactor """
return self.unpack('>H', 24)[0]/1000
@property
def temperature(self):
""" Inverter temperature in °C """
return self.unpack('>h', 26)[0]/10
@property
def event_count(self):
""" Event counter """
return self.unpack('>H', 28)[0]
class Hm300Decode0C(Hm300Decode0B):
""" 1121-series mirco-inverters status data """