trying to set up a new automation with blue tooth tracker. right now I get the lights to come on at sun set if I’m home. but if I come home after sun set they will not trigger, which is what I am trying to accomplish. I was not able to find the answer on my own.
- alias: Turn on Christmas Tree When Home
initial_state: True
hide_entity: False
trigger:
platform: sun
event: sunset
offset: ‘-00:30:00’
condition:
condition: state
entity_id: group.all_devices
state: ‘home’
action:
service: switch.turn_on
entity_id: switch.christmas_tree_lights