Why the heck is there no scene.update service that can be called from automations / lovelace UI actions to update all of the values stored in a scene to their current runtime values.
It is often desirable to allow non-administrative / non-technical users to update scenes (for lighting in particular) without requiring them to have access to or knowledge of the editor UI or Home Assistant settings. Imagine an entity card configured like so where a button’s tap action recalls a scene and the hold action updates the scene:
I should have been more specific - I think there should be a way to permanently update the values stored for entities in an existing scene defined in scenes.yaml without having to either edit the YAML directly or manually fiddle with lighting entities from inside the scene editor UI and re-save it from there, as I would consider both of those to be administrative-level functions.
As I understand it, scenes created on the fly are volatile and do not persist through config reloads / reboots, so that doesn’t work. Ignoring the volatility, you still have to “rebuild” the scene (by specifying desired entities, etc.) in your automations when you call scene.create. That’s an unnecessary step for my use case as I already have an existing - and appropriately named - scene that already contains a list of entities I care about. I just need to update the values associated with those entities to reflect their current state.
As far as a real-life use case, my 10-year-old son has RGB strip lights in his room that he controls through the companion app. I’ve defined some scenes for him (“Bright”, “Dim”, “Wacky!”, “Homework”, “Night Light”). If he decides to change up the “Wacky!” scene, he should be able to recall the scene from a button on his dashboard UI, make manual adjustments to the RGB strip lights through controls on his dashboard UI, then save those changes he just made back to the “Wacky!” scene by pressing a button on his dashboard UI. He doesn’t have access to Home Assistant settings or scenes.yaml, but should still be able to do this without getting “admin dad” involved. This can all be easily done with current Home Assistant functionality except the re-saving part.
Does that make more sense, or have I missed the obvious solution here?
There is no “scene deletion” code to comment out. The system does not work that way. The entities are created and only exist in memory. A system to store and recall from disk would need to be developed.