I broke my HA when deleting content of automations.yaml after creating automation with editor

Please help this Noob, been slowly learning HA and managed to break it today. I tried to create and automation using the editor and tried editing it via the automations.yaml file. I then deleted the content of automations.yaml and now my config is invalid. In the automation editor i get an error when trying to edit or delete the automation from the ui:

Error loading automation (500).

Error when checking config:
Invalid config for [automation]: expected a dictionary. Got OrderedDict([(‘default_config’, {}), (‘google_assistant’, OrderedDict([(‘project_id’, ‘’), (‘api_key’, ‘’), (‘exposed_domains’, [‘switch’, ‘cover’, ‘light’, ‘group’, ‘scene’]), (‘expose_by_default’, True)])), (‘http’, OrderedDict([(‘base_url’, ‘’), (‘ssl_certificate’, ‘/ssl/fullchain.pem’), (‘ssl_key’, ‘/ssl/privkey.pem’), (‘trusted_networks’, []), (‘server_port’, ), (‘login_attempts_threshold’, -1), ('i… (See /config/configuration.yaml, line 25). Please check the docs at https://home-assistant.io/integrations/automation/

1 Like

Remove your automation section that is calling out automations.yaml inside configuration.yaml.

1 Like

Sweet, thanks @petro that worked!