Open dewi-ny-je opened 2 years ago
I tried to change
self.inverters[inverter_id].update({'temperature' : -100})
to
self.inverters[inverter_id].update({'temperature' : unavailable})
and reload HA, but I still see -100 °C, I'm not sure why.
Unavailable would be a variable in Python. So your change would probably give an error, which means nothing gets updated. The -100 was something I think I picked from the original repo. Could even be that -100 is reported by the ecu.
Indeed the ECU reports temperatures as °C but starting from -100°C which becomes 0, and 155°C which becomes 255, and they are done with a int8. Still, it makes no sense, since an offline panel should not have any temperature reported. I'll open an issue upstream too.
How to avoid reporting the temperature when the panels are offline? maybe by skipping providing a number?
When an inverter is not available the temperature reading is -100°C, which throws the graphs out of scale. It should rather be left "unavailable", so that home assistant won't display data points.