Hi guys, I am trying to turn my lights on when I come home. I only want the lights to come on when it is after sunset (with an offset of -1 hour) and before 0030 at night. I am trying to combine the sun and time condition but I cant get it to work. I have tried if the trigger and action work on their own and they do. So the problem lies within the condition.
This is how it looks now:
alias: Test
description: ""
trigger:
- platform: state
entity_id:
- group.somebody_home
from: not_home
to: home
condition:
- condition: sun
after: sunset
after_offset: "-01:00:00"
- condition: time
before: "00:30:00"
action:
- service: light.turn_on
data: {}
target:
entity_id: light.gk_lampen
mode: single
What am I doing wrong? Thank you in advance!