Hi,
I am struggling trying to set a condition in a script.
The script should be triggered by a scene. Basically through that scene I want to turn on the light in the livingroom if it is dark outside.
I have been trying to use conditions in the script but I get the following error message:
[condition] is an invalid option for [script]
This is my code for scripts.yaml:
enter_home:
sequence:
- condition:
condition: or
conditions:
- condition: sun
after: sunset
after_offset: "-00:30:00"
- condition: sun
before: sunrise
befose_offset: "-00:30:00"
- action:
- service: light.turn_on
data:
entity_id: light.livingroom_led
Thanks to anybody who can help!