Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

End time optimization #54

Open
dreamcodeza opened this issue Feb 19, 2023 · 1 comment
Open

End time optimization #54

dreamcodeza opened this issue Feb 19, 2023 · 1 comment

Comments

@dreamcodeza
Copy link

dreamcodeza commented Feb 19, 2023

I use the end_time variable from your 4th card in some of my automations. I'm not sure if it is just my area or other as well, but when stages change when loadshedding is active it gives me the incorrect end time.

I've made a small change that might be worth including that checks if the next start time is the same as the current end time. If true it sets the end time to the next end time instead.

from:

{% set end_time = area_schedule[0].end_time %}

to:

{% if area_schedule[0].end_time == area_schedule[1].start_time %}
  {% set end_time = area_schedule[1].end_time %}
{% else %}
  {% set end_time = area_schedule[0].end_time %}
{% endif %}
@KortgatGH
Copy link

Agree that this is an issue, and it also applies to "ends in* that is incorrect for back-to-back time slots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants