Create and use variables between scenes

Feature description
It would be interesting to be able to pass information between scenes, with user-created variables.

Currently, I’m cheating with fake devices, but it’s not ideal :joy:

Do you have examples of cases where you need this? :slight_smile: To be able to visualize :slight_smile:

I want to turn on the entrance light when I come back from a walk with my dog in the evening (~11 PM).

To do this, I currently use 3 scenes:

  1. If it’s between 10 PM and 1 AM → (variable) fake MQTT device (switch) = 1

  2. If the door opens and it’s indeed between 10 PM and 1 AM (previous variable) → (variable) fake MQTT device (switch) = 1

  3. If the door opens and the two previous variables are 1, I turn on the entrance light.

This way, I ensure that the entrance light only turns on automatically between 10 PM and 1 AM, only when I come back from a walk.
There is double detection: the door must open 2 times within a maximum period of one hour.