Hello everyone!
I’m having trouble on making an automation work.
I want it to turn on hallway and outside light, when I get home (but only when the sun goes down till the sunrises).
The device is a Samsung A9. Here is the automation. Do I need to turn on something on at the configuration.yaml or is the “code” wrong?
- id: '1600802420933'
alias: Turn on the lights when the sun is set and I get home
description: ''
trigger:
- platform: state
entity_id: device_tracker.sm_a920f
from: not_home
to: home
condition:
- condition: sun
before: sunrise
after: sunset
action:
- type: turn_on
device_id: 342f60873f6e466f9e2883cd4d220524
entity_id: light.hallway_ikea_bulb
domain: light
brightness_pct: 75
- type: turn_on
device_id: 8ee305f03a3e41de8e70020409f251c5
entity_id: light.outside_light
domain: light
brightness_pct: 100
- wait_template: 00:10:00
timeout: ''
- type: turn_off
device_id: 8ee305f03a3e41de8e70020409f251c5
entity_id: light.outside_light
domain: light
- type: turn_off
device_id: 342f60873f6e466f9e2883cd4d220524
entity_id: light.hallway_ikea_bulb
domain: light
mode: single
Thanks for your help!!