wernerhp / ha.integration.load_shedding

A Home Assistant integration to track your load schedding schedule.
MIT License
113 stars 21 forks source link

Status alert code producing an error but did not before. #91

Closed corbrink closed 6 months ago

corbrink commented 6 months ago

Lately I'm getting this error woth the markdown card code for the status alert: "TypeError: unsupported type for timedelta minutes component: StrictUndefined"

How do I fix it please?

wernerhp commented 6 months ago

When dod you add the markdown card? Made some fixes a while back. You might want to try recreating it from the latest example.

corbrink commented 6 months ago

I used your code and only changed the sensor to my location. It worked fine until about a week ago when it started giving the error and displayed nothing. I deleted and reinstalled the integration and it works again.

corbrink commented 6 months ago

This seems to be an occurance on the RPi if you don't regularly reboot the unit.

wernerhp commented 6 months ago

This seems to be an occurance on the RPi if you don't regularly reboot the unit.

The TypeError: unsupported type for timedelta minutes component: StrictUndefined error?

wernerhp commented 6 months ago

Which dashboards from the examples do you use?

I see the example for card1.yaml are old and brittle and should be deleted, so best avoid those two.

wernerhp commented 6 months ago

Ok, I think I found the issue. Please update your Status alert card to the latest example

corbrink commented 6 months ago

I use all the dashboard yaml's, none of the automations.

corbrink commented 6 months ago

will do, thanks for letting me know. I will give update after a couple of days.

corbrink commented 6 months ago

Here are 3 screenshots, 1st is your code as in the example, 2nd is with the area sensor removed, and 3rd with new area sensor added. You'll notice that the eskom stage data does not display anymore. This was the same with previous code also. 026 027 028

wernerhp commented 6 months ago

Oh 💩 , I clearly messed that up 😂 #notamorningperson Let me try that again...

wernerhp commented 6 months ago

https://github.com/wernerhp/ha.integration.load_shedding/releases/tag/v1.3.3