Previous state by an automation rule

Hello all,

I want change the state back to previous state by an automation. It is possible?

  modus_lueftung_eg:
    name: Lüftung EG
    options:
    - Standard
    - Lüften
    - Kühlen
    - Abwesend


  - alias: "Lüftung back "
    trigger:
      - platform: state
        entity_id: input_select.modus_lueftung_eg
        to: "Lüften"
    action:
      - delay: "00:25:00"
      - service: ????? back to previous state of modus_lueftung_eg ... ???

Here’s an example of how I remember the brightness of a light so that I can later return it to it’s former state.

In this case, I use an input_slider to store the number. You could use any input (text/boolean/select/etc) that’s appropriate.

thanks :slight_smile: