Can someone help me understand why my configuration is invalid?

I only have two automations in this configuration.yaml. The error doesn’t appear until I add the 2nd automation ( The doorbell) . I don’t understand the error message telling me where to look for the problem. Could someone explain to me what is wrong with my config and as to how I need to troubleshoot these kind of messages.
ha

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate
  
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

binary_sensor:
  - platform: wyzesense
    device: "/dev/hidraw0"
    
life360:
  # MPH, assuming imperial units.
  # If using metric (KPH), the equivalent would be 29.
  driving_speed: 18
  interval_seconds: 10
  max_gps_accuracy: 200
  max_update_wait:
    minutes: 45
  show_as_state:
    - driving
    - moving
  # Set comm error thresholds so first is not logged,
  # second is logged as a WARNING, and third and fourth
  # are logged as ERRORs.
  warning_threshold: 2
  error_threshold: 3
  
# Doorbell Ringing        
  - alias: 'Doorbell'
    trigger:
      - platform: state
        entity_id: binary_sensor.front_door_ding
        to: 'on'
    action:
      - service: media_player.volume_set
        data_template:
          entity_id: all
          volume_level: 1.0
      - service: tts.google_translate_say
        entity_id: all
        data:
          message: 'Doorbell ringing!'
      - service: notify.mobile_app_vnote20
        data:
          message: 'Doorbell ringing!'

Look at the error. It gives you the location/position in the file where the error starts. It doesn’t necessarily mean there is an issue at that exact spot, but in this case it’s telling you it doesn’t like the block mapping or listing of options under the life360 integration. Double check your configuration against the docs and make sure you have the integration and specifically the formatting and block of options correct. I can’t help you with the integration as I don’t use it.

You’ve dumped an automation under your life360 key.

And I shouldn’t have? Where should it have gone instead?

Given that it’s an automation I would suggest that the automation key would be a better place for it, don’t you think?

2 Likes

actually should be in automations.yaml seeing as you included that with the automations: key
all the indending for it needs to change too

1 Like

The reason I didnt add it to automations/yaml is because it says not to edit the automations.yaml manually. So your saying its fine to do so?

Yes.

The thing is that IF you include automations.yaml in the configuration.yaml file you can’t have another automation: section in there… that will be a duplicate key.

If you go into the automations editor you can switch it to yaml mode and paste it in there but it should be fine to edit it manually and you can then open it in the UI editor and see it…

1 Like