jeeshofone / ha-apc-ecu-3

Get homeassistant to read APC ECU-3 data
https://www.123cloud.st/p/the-unexpectedly-direct-path-to-building
4 stars 1 forks source link

Prevent sensors from disappearing overnight #1

Closed DavidWAbrahams closed 9 months ago

DavidWAbrahams commented 9 months ago

As the sun goes down, my solar ECU-3 returns empty values for watts etc for each panel as it goes offline. This PR replaces the empty values with "0" (for numeric fields) and a reasonable substitute timestamp. This allows the sensor to stay visible in Home Assistant overnight.

I.E. "403000056327-B": ["", "", "", "", ""] becomes "403000056327-B": ["0", "0", "0", "0", "2023-10-05 18:34:33"]

jeeshofone commented 9 months ago

Testing this now & overnight! Thanks for the contribution!

jeeshofone commented 9 months ago

This works! Thank you.