Closed luka6000 closed 7 months ago
The issue is with the active schedules, right? I mean, if I restart HA at 23.30, will conditions be evaluated again after midnight?
Yes ofc. The schedule is active and does not work after ha restart. I’m not sure about it working on next timeslot. I already have automation restarting every scheduler after restart
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days
I have the same problem of schedules not re-evaluating conditions even without HA restart.
hello, I see the same problem, I did an automation to temporarily overcome the problem:
description: ""
mode: single
trigger:
- platform: homeassistant
event: start
condition: []
action:
- delay:
hours: 0
minutes: 0
seconds: 20
milliseconds: 0
- repeat:
sequence:
- if:
- condition: template
value_template: "{{ states(repeat.item) == 'on' }}"
then:
- service: scheduler.run_action
data:
entity_id: "{{ repeat.item }}"
enabled: true
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
for_each: |
{{ integration_entities('scheduler') }}
enabled: true
I will detail the problem (I just tested it) after a restart, the schedule works well, however it is just the condition evaluation part that no longer works, for it to work again you have to restart the schedules or call the service
exemple with 2 scheduler with boolean condition.
after restart if i passe the boolean test at false or true nothing is happening but if i disable and enable all scheduler, it's work again
I have the same issue, I use booleans for a number of things, time of year, kids away, boost mode etc. I noticed after a restart earlier these no longer worked.
I manually turned all my schedules off then back on, the booleans appeared to be working again.
I’ve also added the Automation created by @devildant restarted again and the booleans still appear to be functional.
I can confirm this bug and made changes to fix this. @luka6000
So maybe the slot that schedule is in after restart is skipped?
This was indeed the case. Thank you for pinpointing the issue, you made it really easy for me to identify and fix it.
I will post back when the changes are released.
I just made release v3.3.0 of scheduler component which includes this bugfix. I assume this solves the issue for everyone. If not, please let me know.
Condition re-evaluation doesn't work after HA core restart as described here
Checklist
Expected behavior
[What you expected to happen]
set schedule with conditions. Mark "re-evaluate conditions". Schedule should re-evaluate conditions all the time.
Actual behavior
[What actually happened] Schedule is not re-evaluating conditions after HA core restart. One needs to disable and reenable schedule to make it work.
Only thing I can find in the logs is this
So maybe the slot that schedule is in after restart is skipped?
Steps to Reproduce
[Explain how to see the behaviour]