WTH can't i resume light after a scene

As the title says:
After a scene triggers it would be great to be able to resume the (in my case) lights to it’s previous state.

Ex. We have a motion detector in our staircase that activates a scene at night (so you don’t trip) and set some dim lights in the kitchen and hallway.

It would be great to be able to tell HA to resume it’s previous state after a while instead of having to set up and update 2 scenes.

You can do this by creating scenes on the fly

The example at the bottom even shows you how to return to the previous state.

That’s handy but not really what I’m asking for since, the automation needs to know what entities in the scene, iow again 2 places.
I want to trigger a scene and resume, not having to specify all the entities multiple times.

It is what you’re asking for though. It’s not as easy as you want it to be :wink:

Uhm no, since your suggestion do not solve the issue, it is not, by definition, the solution.
If I was able too snapshot the entities of a scene it would be, it is not the same as have to manually specify the same entities again.

Resuming a scene will absolutely do that. Try it.

1 Like

not only that but you can easily template it…

  - service: scene.create
    data_template:
      scene_id: before
      snapshot_entities: "{{ state_attr('scene.xxx', 'entity_id') | join(', ') }}"
1 Like

You mean that i can do something like this:

  action:
  - service: scene.create
    data:
      scene_id: before
      snapshot_entities:
      - scene.downstairs_night

A small change and it worked :slight_smile:

 - service: scene.create
    data_template:
      scene_id: before
      snapshot_entities: "{{ state_attr('scene.xxx', 'entity_id') | join(', ') }}"
1 Like

are you talking about the space you added before each field?

no I had to change

state_attr('scene.xxx', 'entities')

to
state_attr('scene.xxx', 'entity_id')

1 Like

Ah, ok. I didn’t notice that!