home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.13k stars 2.81k forks source link

Automations YAML editor doesn't prevent adding bogus ID, which makes HA lose track of automation. #22395

Open vsessink opened 1 month ago

vsessink commented 1 month ago

Checklist

Describe the issue you are experiencing

Describe the behavior you expected

Trying to add an id tag should be prevented. The UI must not allow such bogus IDs and it should not loose track of the automation if someone tries to add an id.

Steps to reproduce the issue

  1. go to Settings - Automations & Scenes
  2. click + Create automation
  3. without changing anything, click "Save" (you may stay with New Automation for name)
  4. Click the ← arrow to see your automation
  5. Click the new automation to edit it and click the ⋮ three dots menu to Edit in Yaml. Your automation will look like this:
alias: New automation
description: ""
triggers: []
conditions: []
actions: []
mode: single
  1. Add a line that just says: id: something
  2. Click Save

Home Assistant replies Automation is unavailable. Removing the id line doesn't help, the automation is lost in cyberspace. It can be found in the automations.yaml file though.

What version of Home Assistant Core has the issue?

2024.10.2

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Firefox 131.0.2 (64-bit)

Which operating system are you using to run this browser?

Ubuntu Linux 22.04.5 LTS

State of relevant entities

Sometimes, the automations show up in Devtools, saying "restored: true", but with State "unavailable".

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

C-Duv commented 13 hours ago

Is there a solution to manually delete those bogus entities? The state explorer can list such entities, but won't offer to delete them.