Hi Everyone,
Just wondering if anyone could double-check the automation below. I’m trying to set up my living room light in such a way that it:
- Turns on 30 minutes before sunset
- Only when my wife or me are home
I’ve created groups.yaml and made a group called somebody_home so I can check for the state of that group.
Is the code below correct for what I want to achieve?
description: ""
trigger:
- platform: sun
event: sunset
offset: "-00:30:00"
condition:
- condition: state
entity_id: group.somebody_home
state: home
action:
- service: light.turn_on
data:
transition: 1800
brightness_pct: 40
target:
entity_id: light.hue_infuse_ceiling_1
mode: single```
Thanks in advance folks!