Input_select last state question

I’m wondering if it is possible to return an input_select backs to it’s previous state in an automation. Here’s an example.

input_select:
  pool_pump:
    name: Pool Pump Mode
    options:
      - 'Auto'
      - 'On'
      - 'Off'

Scenario: Input select is on Auto and then an automation turns it to off to perform another function. Then at the end, the automation checks to see what state is was in before it changed it and sets it back to that setting.

Is that doable as that will help me tidy up quite a few automations?

Pretty sure you can capture input_select states in a scene. Which means you can do the create/restore scene on the fly, look at the second example: https://www.home-assistant.io/integrations/scene/#creating-scenes-on-the-fly

1 Like

Good thinking, thank you! I’ll look into that. Had not crossed my mind.