Tom, I agree this would work but the purest in me objects as this is unnecessarily processor intensive (just 1 check a minute so yeah I’m being picky) surely it would be better to have 2 triggers (the time (05:15) and the temp) and two conditions (again the time slot and the temp)?
Or have I missed something ?
Oh by the way, my apologies, following tink’s reprimand for “tagging you on another thread”
It’s really not that intensive but on further reflection you are right. If the temp goes below 21 during the time period it will trigger so we really do only need to check at the start of the time period.
Okay I’m not going to answer this, I’m going to get you to answer it.
I will set the scene : - it’s 08:20 on a Saturday and the temperature has just dropped below 21 degrees
So start at the top, what triggers the automation ?
Then take us through what your code is and the decision tree from that point.
The automation is triggered by the second time block because only there Saturday is mentioned.
Well that is the idea, but I don’t know if its working like I think it should work, thats why Iam asking
No, it will NEVER get there because it stops the whole automation processing at the second condition because the time doesn’t match.
First fail and you’re out.!
(clue: the Saturday does not meet the criteria)
See post 6 again
By default, multiple conditions are logically ANDed. That means the first AND the second AND the third AND the fourth condition must all evaluate to true in order to execute the automation’s action.
What you want is a logical OR. The first condition OR the second condition OR etc. See the documentation for examples: OR condition
No, this won’t work
Your yaml spacing is wrong, the first condition header should be in line with trigger, also you will need time triggers for the sat and sun in the trigger section (ie the times for the opening slot as discussed for the first slot) then you will need to indent to follow the preceeding spacings too
The logic otherwise seems sound
Just to be clear: your weekend start times are the same so you only need the 1 extra trigger
You may wish to add the weekend schedule to the trigger:
- platform: time
at: '08:15:01'
EDIT
Never mind. You already posted it while I was composing my message …
EDIT 2
I must admit that the new Device Automation feature is nifty when used in the Automation Editor. However, the YAML it generates is considerably more verbose than the traditional way.