@MDLefevere wrote:
Hello,
I’ve made an automation to trigger a switch between a time period when one of us gets home, or if we are home when the sun sets.
Strangely it doesn’t get triggered when I get home after sunset.
# Lichten aan bij zonsondergang of wanneer iemand thuis tussen 16.00-23.00 - alias: 'Keukenverlichting aan bij thuis of thuiskomst' trigger: - platform: sun event: sunset offset: '-00:00:00' - platform: state entity_id: device_tracker.iphonemaurice to: 'home' - platform: state entity_id: device_tracker.iphone_van_yvette_2 to: 'home' condition: - condition: state entity_id: device_tracker.iphonemaurice state: 'home' - condition: state entity_id: device_tracker.iphone_van_yvette_2 state: 'home' - condition: time after: '16:00:00' before: '23:00:00' action: service: switch.turn_on entity_id: switch.sonoff_voortuin
I just copied and edited a full written example from the Hassio website:
Any suggestions?. I can’t figure out what’s wrong with it.
Posts: 15
Participants: 3