Problem
scene.create allows dynamic scene creation, but scenes are lost after Home Assistant restart. There’s no built-in way to make dynamically created scenes persistent.
Requested Feature
Add ability to save scenes permanently, ideally triggered by long-press button events.
Desired workflow:
- Adjust lights to desired state
- Long-press button (2-3 seconds)
- Scene is saved persistently to configuration
- Short-press recalls the scene
- Scene survives restart
Use Case
Users want to easily update scene settings (brightness, colors) without editing YAML files. Common in other systems (Loxone, KNX, Philips Hue).
Current Workaround
Complex Node-RED flow with 7+ nodes to:
- Capture states with
scene.create - Manually write to
scenes.yaml - Reload scenes
This should be simpler.
Proposed Solution
Option 1: Add persistent flag
yaml
service: scene.create
data:
scene_id: living_room_custom
snapshot_entities:
- light.living_room_1
- light.living_room_2
persistent: true # NEW: Write to scenes.yaml
Option 2: New service
yaml
service: scene.learn
data:
scene_id: living_room_custom
entities: [...]
Benefits
- User-friendly scene creation
- No YAML editing required
- Scenes survive restarts
- Better family acceptance (WAF)
Technical Notes
- Write to
scenes.yamlor.storage/ - Auto-reload after save
- Handle concurrent writes safely