Can someone help me with this automation?

alias: 'Sunset, all on, cloudy, dereks home'
trigger:
  - platform: sun
    event: sunset
    offset: '-01:30:00'
condition:
  condition: and
  conditions:
    - condition: numeric_state
      entity_id: sensor.weather_cloud_coverage
      above: 90
    - condition: state
      entity_id: device_tracker.dereks_phone
      state: 'home'
    - condition: state
      entity_id: group.nolan_kalee
      state: 'not_home'
action:
  - service: notify.kitchen_tablet
    data:
      message: "Good evening Derek, it's cloudy, so I'm turning the lights on early."
  - delay: '00:00:03'
  - service: light.turn_on
    entity_id: group.hallway_light
    data:
      brightness: 192
      transition: 1
  - service: light.turn_on
    entity_id: group.dining_room_lights
    data:
      brightness: 192
      transition: 1
  - service: light.turn_on
    entity_id: light.bar_light
    data:
      brightness: 255
      transition: 1
  - service: light.turn_on
    entity_id: light.living_room_light
    data:
      brightness: 255
      transition: 1
  - service: light.turn_on
    entity_id: light.office_light
    data:
      brightness: 255
      transition: 1
  - service: switch.turn_on
    entity_id: switch.desk_lamp

It looks correct to me… but it breaks HA when I add it to my automation.yaml

Can you post the error you get when you add it?

I don’t even get an error in my home-assistant.log

It just straight shuts everything down. Is there another way to detect errors?

You could run this at the terminal prompt:

sudo systemctl status home-assistant.service -l

It should give you some info.

Hmmmmm that does give me a bit but nothing that looks remotely related to what my issue is.

Figured it out, something dumb.

Always a good idea to say what it was, in case someone else sees this later. Kind of like writing a murder mystery and then tearing out the last page. :laughing:

3 Likes

I was embarrassed… lol I forgot to add the “.yaml” to the end of my automation file when adding it to my automation.yaml

1 Like

Don’t be! We’ve all done that or something similar. :wink: