Except the example you posted does not logically OR all three Time Conditions.
Move the first Time Condition to where the other two are so all three are defined under condition: or
.
Except the example you posted does not logically OR all three Time Conditions.
Move the first Time Condition to where the other two are so all three are defined under condition: or
.
Stupid of mineâŚdistraction. Now i think is wright.
- id: '1625524784081'
alias: Estores - Fechar (VerĂŁo)
description: ''
trigger:
- type: temperature
platform: device
device_id: 93d20bab264211b2b80b8621b2105d85
entity_id: sensor.temperature_158d00056e4ed5
domain: sensor
above: 23
- platform: homeassistant
event: start
- platform: time
at: '9:31'
condition:
- condition: or
conditions:
- condition: time
after: '10:30'
before: '21:00'
weekday:
- sat
- sun
- condition: time
after: '9:30'
before: '13:30'
weekday:
- thu
- condition: time
weekday:
- mon
- tue
- wed
- fri
after: '9:30'
before: '21:00'
- condition: and
conditions:
- type: is_temperature
condition: device
device_id: 93d20bab264211b2b80b8621b2105d85
entity_id: sensor.temperature_158d00056e4ed5
domain: sensor
above: 23
- condition: numeric_state
entity_id: sensor.dif_temp_out_in
above: '-2'
action:
- device_id: ba8506c6ab7179834351692c0402b3a6
domain: cover
entity_id: cover.shellyswitch25_8caab505897a
type: set_position
position: 30
- device_id: cf9c73e41233e6d800d229ee6fafcd39
domain: cover
entity_id: cover.shellyswitch25_8caab54b84e7
type: set_position
position: 30
mode: single
All three Time Conditions are now logically ORed so that should work the way you expect.
However, I hope you realize that the automation will not execute the action
on Saturday and Sunday when it triggers are 09:31
. Thatâs because your Time Condition for those two days has a time range starting at 10:30
.
The original requirement was just one Time Condition whose time range is 09:30
to 21:00
. Thatâs why the Time Trigger was set at 09:31
. However, the automation has evolved and has another Time Condition with a different time range. A quick fix is to change the Time Trigger to this:
- platform: time
at:
- '09:31:00'
- '10:31:00'
Great point! Thank you soo much for your attention! Really good. Corrected.
One more note:
I also needed to put the DT variable as a trigger
Thank you soo much for all the help!
Youâre welcome!
Please note that it is the custom of this community to assign the Solution tag to the first, or best, post that explains the problem and how to correct it. Only one post in the entire thread can be marked with the Solution tag. The Solution post is used by other users to understand what was wrong and why the suggested solution corrects it.
You have marked your own post with the Solution tag but it simply shows the end-result of everything that was already explained and suggested for you to do. If you examine other topics with Solutions, youâll see that topic authors donât normally mark their own posts as Solutions unless they were truly the first to solve the problem on their own.
Having said that, you are the topicâs author and free to choose whichever post you want to represent the Solution.