safepay / sensor.fronius

A Fronius Sensor for Home Assistant
MIT License
80 stars 32 forks source link

Fixed handling of json data. #25

Closed nilrog closed 4 years ago

nilrog commented 4 years ago

This is a pull-request that addresses a problem where sensor values are sometimes set to 0 causing issues with at least the utility meter integrations. Some of it was due to my earlier pull-request that set the value to 0 if it was "None". But the integration also skipped some parameters because it was doing a boolean check on the parameters and if they were "Null" or "0" they would be skipped.

There are a bunch of debug level printouts left in this one too. Feel free to delete them, or ask me to do it, if you do not want them. They are there to assist with troubleshooting if there are issues with some sensors. And they helped me identify the issues.

I shared this change in the HA forum 12 days ago and at least one person downloaded it and haven't complained yet, but I have asked for feedback now. https://community.home-assistant.io/t/fronius-inverter-integration/19274/284

I also shared it with the user who write this issue in your repo and according to him this patch is working fine. https://github.com/safepay/sensor.fronius/issues/23