aukedejong / lovelace-windrose-card

Home Assistant Lovelace Windrose Card
82 stars 3 forks source link

Blank card. Error: Could not convert direction unknown to degrees #26

Closed olivierouellet closed 1 year ago

olivierouellet commented 1 year ago

When restarting Home Assistant, my sensors have an unknown state for a short period of time. It seems like it's not a major problem for the speed entity, but it is for the direction entity (which is in letters for me), so there's no rendering of the card until time passes and I no longer have any unknown state in the timeframe specified with hours_to_show .

Would it be possible to ignore any value that have an unknown state? I don't restart often so not a big deal for me, but it might prevent strange issues down the road. Also, should it include unavailable and None states?

This is what I get in Chrome console:

unknown
aukedejong commented 1 year ago

I will have a look at this. The idea was to ignore the values and log a warning. It should not break the card, if there are other correct states. Probably a bug.

olivierouellet commented 1 year ago

I got another error with unavailable instead of unknown . Again no rendering of the card for a while and then suddenly worked again after a few hours.

Unavailable

Lovelace Windrose card 1.0.0 - Home Assistant 2023.6.1 - Supervisor 2023.06.1 - Operating System 10.2 - User Interface: 20230608.0 - Chrome 114.0.5735.106

aukedejong commented 1 year ago

Release version 1.0.1 Now ignoring wind directions that are not a number.

Thanks Olivier for helping others, gives me more time to fix things.

aukedejong commented 1 year ago

Release version 1.0.2

olivierouellet commented 1 year ago

Problem solved for me. I'm glad to help. I'll try to learn from you along the way. And don't worry, I'll step back if I see I'm messing thing more. Thanks again for the new releases. This card is awesome!