garbled1 / homeassistant_ecowitt

Ecowitt Weather Station integration for homeassistant
Apache License 2.0
143 stars 70 forks source link

Fix Lightning strike timestamp error in 2022.3 #100

Closed sam-ward closed 2 years ago

sam-ward commented 2 years ago

Fix the error: ValueError: Invalid datetime: sensor.last_lightning_strike has a timestamp device class but does not provide a datetime state but <class 'str'>

in 2022.3 while in lieu of the integration being incorporated into core.

sam-ward commented 2 years ago

I have 2 ecowitt panels/gateways (hp2550 and gw1000) and seem to be getting different result depending on which is configured, so maybe this is not the complete fix. The GW1000 seems to be happy, but the HP2550 is still causing errors.

sam-ward commented 2 years ago

So I will close this PR, as its not fixed the problem, and i've worked out why I am getting different behaviour (I'll add comments to the main issue #87