Olen / lovelace-flower-card

Lovelace Flower Card to match the custom plant integration
https://github.com/Olen/homeassistant-plant/
193 stars 31 forks source link

Card breaks if battery sensor is unavailable #76

Closed brandondb1 closed 7 months ago

brandondb1 commented 1 year ago

Hello,

Thanks for this great card (and the integration that it goes with)!

I just noticed that that my plant cards had all disappeared after working fine for a long while. I can't pinpoint exactly when they stopped working as I hadn't checked for a while, but I note that there have been updates of both the card and the integration in the past few weeks.

Anyway, after troubleshooting, I found that if the status of the battery sensor is unavailable, the whole card fails to render in the front end. There are no log messages I could find, so I'm not sure what the problem is. What I discovered though is that if I remove the batter_sensor parameter from the card, it reappears, and if I go into the states window and manually set the battery value to something, the card also reappears, so it definitely seems to be the 'unavailable' state of the battery sensor that is the issue.

I am using miflora sensors, which have intermittent issues displaying the battery level (a known problem documented elsewhere), so I know that this issue with the flower card is new.

Thanks again for your work!

dankarization commented 11 months ago

Card stops to redred for me if any of used sensors in it are unavailable or unknown. So any sensor with dead battery causes it to stop showing

Olen commented 7 months ago

Probably fixed. See #81