I’ve been struggling to make this work.
The idea is simple. If, during the daytime, the remote hasn’t been pressed for thirty minutes, turn off the light. I’ve scripted the delay and turn off and it works.
This is what I’ve added to the automations.yaml file:
- id: "hue-lys autoav" # Skru av lyset etter 30 minutters inaktivitet
alias: "huelys av på dagtid"
trigger:
platform: state
entity_id: sensor.huedimmer_updated
condition:
condition: and
conditions:
- condition: state
entity_id: light.jakobs_rom
state: 'on'
- condition: time
after: '08.00.00'
before: '19.00.00'
action:
entity_id: jakob_lys_autoav
```
I get an invalid config error but I can't find anything useful in the logs and while I've been trawling the website to see what I've done wrong.
Can anyone see where I messed up?
Thanks
Thanks. Fixed that. Still not there.
I see now what is missing. The action is in a script that I wrote (and which is working), but I don’t have a call to start that script.
How do I do that?
condition:
condition: time
# At least one of the following is required.
after: '15:00:00'
before: '02:00:00'
weekday:
- mon
- wed
- fri
```
From what I understand, it should be possible?