Home Assistant Version: 2025.8.3
Installation Type: OS
Description
I'm experiencing an issue with wait_for_trigger when using the for parameter. The automation gets stuck indefinitely when the trigger condition is already true at the time the wait_for_trigger is executed.
Expected Behavior
When wait_for_trigger is executed and the condition is already true, it should:
- Recognize the condition is met
- Start the timer (10 minutes in my case)
- Continue execution after the timer expires if condition remains true
Actual Behavior
When the automation reaches wait_for_trigger and the sensor value is already above the threshold (≥160W), the automation gets stuck in an infinite wait state and never proceeds, even though the condition remains true continuously.
Configuration
- wait_for_trigger:
- value_template: "{{ states('sensor.2_shem_channel_1_power') | float(0) >= 160 }}"
for:
minutes: 10
trigger: template
alias: "Wait until power sensor stays >= 160 for 10 continuous minutes"
Steps to Reproduce
- Set up automation with
wait_for_triggerusingforcondition - Ensure the sensor value is already above threshold before automation reaches this step
- Observe that automation never proceeds beyond
wait_for_trigger
Workaround Found
The issue only occurs when condition is already true. If the sensor value drops below threshold and then rises above it again, the wait_for_trigger works correctly.
Questions
- Has anyone else experienced this behavior?
- Is this a known bug or expected behavior?
- Are there recommended patterns for handling this scenario?
Environment Details
- Sensor: Power monitoring sensor (numeric values)
- Values are stable (no rapid fluctuations)
- No
unavailable/unknownstates during testing
Any insights or similar experiences would be greatly appreciated!
Mauro