Control a device with a variable value

Hello,

in a scene, is it possible to « Control a device » by specifying as the value a variable « Retrieve last state »?

Specifically,

  • Creating a scene
  • Monitoring the state of a button that can return 3 or 4 states (1 2 3 5)
  • Retrieving its value
  • Control a device (an MQTT device)
  • Value: value of the button

If this isn’t possible, does that mean you need to make 4 different scenes?

Thank you

You simply put multiple triggers in your scene (start the scene if 1, start it if 2)
Then you will look up the last value…

I didn’t understand how you’re using that last value, could you please clarify?

It’s a bit difficult to guide you perfectly without having all the info, but the « control a device » box should be able to do what’s needed, right?
Can you specify what you need? Maybe screenshots of your devices and the exact behavior you want?

I may not have explained myself clearly.

Using the trigger, as soon as an action is performed on the button:

1st step, I retrieve its value:

2nd step, I want to send the previous value to an MQTT device:


But the value must be numeric — it’s impossible to use the variable…

If that works, I can create a single scene regardless of the button’s value.
If I’m forced to enter a numeric value, I have to create one scene per value; for this example, that makes 3 scenes…
Each scene uses a specific number in the trigger and sends the same value to the device.

Not possible at the moment:

Thanks, I just voted for it.