Hey there,
I hope you can help me get this working.
I tried to make an automation which checks if the value (number) of an entity is below 95% and if so then sets it to 99%.
But this should only happen if it is NOT on saturday between 10:58 and 11:10. (Because this is the time when the valve will open and close completely to prevent it from getting stuck.)
But somehow the “NOT” condition seems not to work and the whole automation does not run…
Can you find my mistake?
alias: FBH-Kreis Bad öffnen
description: ""
triggers:
- trigger: numeric_state
entity_id:
- number.hmip_falmot_c12_001b9d898f9bd1_level_ch10
for:
hours: 0
minutes: 2
seconds: 0
below: 95
conditions:
- alias: Es darf nicht samstags zwischen 10:58 und 11:10 sein
condition: not
conditions:
- condition: time
after: "10:58:00"
before: "11:10:00"
weekday:
- sat
actions:
- action: number.set_value
metadata: {}
data:
value: "99"
target:
entity_id: number.hmip_falmot_c12_001b9d898f9bd1_level_ch10
mode: single
You do realize this automation only fires exactly 2 minutes after number.hmip_falmot_c12_001b9d898f9bd1_level_ch10 changes from above 95 to below 95?
If it already is below 95 for longer than 2 minutes then nothing happens. If it happens saturday between 10:58 and 11:10, then it also won’t do anything saturday after 11:10 unless you add another trigger and condition.
If you add a trigger to recheck saturday at 11:11 and a condition for below 95 this automation should work fine. It just does not check unless anything changes that might require action.
The automation gets triggered everytime the value of the sensor changes.
Then it checks if the value is below 95%
And after that it checks if it is NOT on saturday between 10:58 and 11:10.
So for my understanding the conditions will be checked everytime the trigger starts the automation?!
So especially for the time-condition:
It will be checked everytime the value (trigger) changes.
And if the value changes from 58% to 23% the trigger is fired and BOTH conditions will be checked - right?
Only if both conditions are true the action will be done?!