I am trying to set up some automations with time conditions but when I click “TRIGGER” from the UI the action still takes place even when the condition is not met.
(I do wonder if this method of triggering ignores the conditions but I cannot check until I get home later)
I have tried:-
- condition: state
entity_id: sensor.garage_status
state: closed
for: 08:00:00
and
- condition: state
entity_id: sensor.garage_status
state: closed
for:
hours: 8
I have the following automation which seems to ignore my Time Conditions. Basically, I only want the script to be turned on in the following time slots and also only if the input_boolean.medchecker is off.
- id: finn_meds_counter
alias: Finn Meds Counter
hide_entity: true
initial_state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.door_window_sensor_158d00019da6da
to: 'on'
condition:
condition: or
conditions:
- condition: time
after: '05:30:00'
before: '06:45:00'
- condition: time
after: '11:45:00'
before: '12:30:00'
- condition: time
after: '15:30:00'
before: '16:30:00'
- condition: time
after: '21:30:00'
before: '22:30:00'
- condition: state
entity_id: input_boolean.medchecker
state: 'off'
action:
- service: script.turn_on
entity_id: script.finn_meds_counter
I’d say wrong assumption. When I trigger an automation my thinking is that it tests that automation entirely, from start to finish if you like, am I wrong?
Dunno where I read it (it may have even been a post similar to the OP) but I found this early on and just accepted it.
As Tinkerer says add a input boolean (I always have a spare)
IMHO there should be two buttons (and matching services) . ‘Trigger now’ and ‘trigger if conditions are met’ (I’m not touting those as the actual interface texts but you get my point).