Closed boozelclark closed 1 year ago
Is this the starts_in
in the sensor attributes or the Card's yaml?
I think it's both. It may not actually be if the next slot is not the following day but if it is more than 24 hours away. I'll try and replicate this next time my loadshedding schedule is in that state and share more accurate details
It appears to be the card's yaml.
It is currently 18:55 on 03 November. The sensor attributes shows 1625 minutes (1d, 3h, 5m). But the cards shows 3h 5m.
I'v spent an hour looking at it but templating skills are not up to fixing this. I narrowed it down to {{ starts_in.seconds }} drops the day and only returns the hours and minutes, But i don;t know how to fix it.
Thanks Werner for this integration it is great!
The issue is with .seconds
which should be .total_seconds() | int
.
Made some tweaks. Let me know if this works.
I'd also recommend you check out the latest dev release for a new card.
Fixed card4.yaml
in v1.1.0-dev.2
The starts in sensor only looks at times so it gives an incorrect value in the low stages of loadshedding when an areas next slot is the following day. The delta calculation needs to be between the two datetimes and not just the times.