Feature Request: Persistent Scene Learning (Survive Restart)

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:

  1. Adjust lights to desired state
  2. Long-press button (2-3 seconds)
  3. Scene is saved persistently to configuration
  4. Short-press recalls the scene
  5. 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.yaml or .storage/
  • Auto-reload after save
  • Handle concurrent writes safely

Feature requests go here: home-assistant · Discussions · GitHub