core icon indicating copy to clipboard operation
core copied to clipboard

Creating / Editing Scene adds invalid ID to scenes.yaml

Open devedsmith opened this issue 3 years ago • 1 comments

The problem

We have a repeatable issue when creating a new HA Scene using the app or in the web interface.

Upon adding the device or entities and hitting save to create the New Scene (and it does successfully create the scene), there is an ID: xxxxxxxxxxxxxxxxxxxxxxx being added to scenes.yaml which causes the following error:

Invalid config for [scene]: [id] is an invalid option for [scene]. Check: scene->id. (See /var/snap/home-assistant-snap/523/configuration.yaml, line 10).

The error occurs exactly the same every time, whether a new scene is added or an existing scene is edited and saved.

The ID is added in the same place in the file just underneath the token for lifx_cloud. If the platform token is moved elsewhere in the file, the errant ID is placed under the token regardless - appearing as if it's directly tied to the lifx_cloud platform designation however these are scenes being created/edited natively in HA.

So we see something like this (even though the scene has nothing to do with a lifx device):

  • platform: lifx_cloud token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx id: xxxxxxxxxxxxxxxxxxx (this causes the config error)

If I then edit the scenes.yaml and remove that new id line the configuration error goes away and everything runs as normal.

What version of Home Assistant Core has the issue?

20220802.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Invalid config for [scene]: [id] is an invalid option for [scene]. Check: scene->id. (See /var/snap/home-assistant-snap/523/configuration.yaml, line 10).

Additional information

No response

devedsmith avatar Sep 20 '22 14:09 devedsmith

Yep, same happens with me. Can confirm happens with the lifx integration so any editing in UI to create/add/edit scene breaks the config.

skynet01 avatar Sep 21 '22 06:09 skynet01

Same here. Thanks for raising this! I was able to fix my config file without sweating too much!

AndraBa avatar Oct 13 '22 09:10 AndraBa

We have an update on this issue that I wanted to share.

So the problem with the errant ID code being inserted into scenes.yaml continued every time we would edit a scene. It did not matter whether the scene had any lifx devices in it - every scene edit caused the problem. The line has to be removed for the configuration to be valid (we forgot to remove it one time and rebooted the server and nothing worked).

Anyway - I decided to split out the lifx integration token into its own yaml and add another scene include in configuration.yaml. So now in configuration I'm including scenes.yaml and a new file called lifxscenes.yaml. The issue with editing scenes has completely gone away.

By having the lifx token and id in its own file and including it in configuration.yaml we can now edit any scenes in the system and it does not add an errant ID to scenes.yaml or to the new lifxscenes.yaml. However when I put the lifx token back into the main scenes.yaml and edit a scene the error comes back. So it appears that splitting it out to its own file has resolved the issue.

tarheelheath avatar Oct 20 '22 18:10 tarheelheath

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

This error is still present

skynet01 avatar Jan 19 '23 23:01 skynet01

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Still present, still annoying 😭

skynet01 avatar Apr 20 '23 10:04 skynet01

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.