Hi guys, I just don’t get it. I want to have simple condition “If window closed for >15s” for my automation but it is never true, only if time is smaller then 3 seconds. How is this possible?
It doesnt make a difference if I try “device->…” or “state change” or numeric state…its always the same song.
Is binary_sensor.switch2
a „real“ contact sensor or a template sensor?
And please post your complete automation code using the </>
code button in the editor here.
Hi, thanks - it is a real reed switch connected to ESP (tasmota).
condition:
- condition: state
entity_id: binary_sensor.switch2
state: "off"
for:
hours: 0
minutes: 0
seconds: 15
Same problem with:
type: is_not_open
condition: device
device_id: dd17f95ad291eafcbf8038a0542551c3
entity_id: binary_sensor.switch2
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 15
Besides, why is it “is_not_open” anyway? If I replace this with “closed” it says “unknown condition”.
The first is a state condition, the second a device condition.
I meant the complete automation code.
You did provide almost no details needed to debug this.
Anyhow, sounds like either (1) your binary_sensor.switch2
behaves differently than you think or (2) your trigger+condition combination is unfortunate. Please post the complete yaml code of your automation… Additionally please post the recent history (“Verlauf”) of both the condition entity as well as the trigger entity.
Hi guys, you dont need the complete automation, because it doesnt matter. An empty automation with just the condition (-> test condition ) will bring exactly the same result. Thats why I posted the pics on top: Condition true (<3s) or not true (>3s).
History basically looks like this:
That’s an important detail.
Did you try another entity or incrementally other durations (e.g. 4s)? The issue as you describe it seems wild and is certainly not a general bug. You need to dig a bit deeper.
Only other durations:
1-4s true
5s sometimes true, toggles randomly
Larger 5s never true
Never had this problem with anything else. That’s why I’m here…