Helper configuration

Hello,

I have a input_number entity with 3 options (1, 2 and 3).

‘1’ and ‘2’ are enabled/disabled by a manual call-service.

‘3’ is enabled/disabled by an automation.

So far so good, but how can i tell HA to change to previous setting when it changes back from ‘3’?

example:

input_number is on ‘1’
automation changes it to ‘3’
automation changes to ‘2’ (because i made it that way)

If the previous setting is ‘1’, how i can i tell the automation to change back to previous value?

Thnaks in advance!

Use 2 input numbers.
One for setting the manual mode and one for the actual state, which you will change with automations. You would need an additional automation that sets the second one if you manually change the first one. If you want to get the initial state just take it from the first input number.