Unable to add new automations

I am having difficulties adding Automations via the UI. When I add one, I get this error message displayed on the web page.

Message malformed: required key not provided @ data[‘trigger’][0][‘entity_id’]

I had been mucking around manually editing automations in my automations.yaml file, so I thought I must have stuffed something up, but could not figure it out. Eventually, I just cleared the whole file (so automation.yaml is now blank), restarted HA, and I am still getting this error message, even if I add a new automation and just change the title and hit ‘Save’.

I have checked the Hassio tab and it doesn’t give me an option to update (I updated reasonably frequently) so I believe I am on the right version.

Running ‘hassio info’ from the command prompt yields this information.

arch: armv7
channel: stable
hassos: “3.8”
homeassistant: 0.104.3
hostname: hassio
logging: info
machine: raspberrypi3
supervisor: “195”
supported_arch:

  • armv7
  • armhf

Can anybody point me in the right direction? I’ve been running a stable system for more than 6 months, so this is really surprising.

More info. I added a single automation to my automation.yaml file, hit save, and when I run the Configuration check in the UI, I get the same error message.

- alias: test routine
  description: ''
  action: 
  - data:
      brightness: '255'
      entity_id: light.table_lamp
    service: light.turn_off

Please ignore. Turns out if you don’t have a trigger defined, you can’t add an automation.

I also found that a lot of my older automations didn’t explicitly define ‘entity_id’ which used to be ok, but now appears to be more rigorously enforced, so I went through and fixed everything up.

Issue resolved.