Hi,
The following problem occurred after I updated from 2024.2.3 till 2024.4.4 on my NAS. I have an automation configured in parallell mode. In the UI I have an input_number (call it “amount”) which I modify and that triggers the automation. I also have an input_select entity called maltid that can be changed from my dashboard or by the automation.
Use case is that I enter the amount of medicine I take, and that should make the input_select entity to change to “Medicine”. After 5 minutes I am expected to having finished the medicine so the automation will make the input_select entity go back to “Not eating”. However, I might manually select “Breakfast” during the 5 min. Then, the automation should not change to “Not eating” after 5 min.
Automation conf:
Trigger: Amount changes
(Input select entity is initially set to A=“Not eating”)
Actions:
1) Input select, select option B = “Medicine”
2) Define two variables:
i) currenttime: “{{now}}”
ii) mealtypechangetime: “{{states.input_select.maltid.last_updated}}”
3) Wait (with timeout 300 seconds) for input_select.maltid to change
4) Input select, select option A=“Nothing”.
Inspection of the trace:
1) Executed at 22:55:21.
2) Executed at 22:55:21.
Changed variables:
currenttime: '2024-05-04 22:55:21.102391+02:00'
mealtypechangetime: '2024-05-04 20:55:21.099189+00:00'
3) Executed at 22:55:21.
Result:
wait:
remaining: 299.99044739996316
trigger:
entity_id: input_select.maltid
from_state:
entity_id: input_select.maltid
state: Not eating
last_changed: '2024-05-04T14:27:32.975470+00:00'
to_state:
entity_id: input_select.maltid
state: Medicine
last_changed: '2024-05-04T20:55:21.099189+00:00'
4) Executed at 22:55:21.
My comments:
1) OK
2) OK
3) Ends almost immediately - not expected. The trace tell me that it reacted to the change in input_select, that had already occured in step 1 (note the separation of six hours between changes in maltid, which means that there was no other automation that did this).
4) Not expected. Expected 23:00:21.
yaml code for the trigger part:
wait_for_trigger:
- platform: state
entity_id:
- input_select.maltid
timeout:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0