Set temp variables in Actions without having to declare them

What I was wanting was to be able to have an action that “stores” a variable that only applies to that action set for that automation without having to configure them anywhere else.
This should then be able to be used in later actions…

This would be useful for eg when you want to turn a light blue to show that you have new mail then return it back to its original state.

E.g: (in interface)

Action 1:
Action type: Store Temp Variables
Variable Data: {“PreviousState”:“light.StudyDesk.state”, “PreviousColor”:“light.StudyDesk.attributes.rgb_color”}

Action 2:
Action type: Call Service
Service: light.turn_on
Service Data: {“entity_id”: “light.StudyDesk”,“rgb_color”: [0,0,255]}

Action 3:
PSUDO: Wait for X seconds

Action 4:
ActionType: Call Service
Service: SetData
Service Data: {“light.StudyDesk.state”: “{{TempStore.PreviousState}}”, “rgb_color”: “{{TempStore.PreviousColor}}”}

The stuff in bold would need to be added … I think there should be a SetData service as it is just frustrating to no be able to set states and attributes on multiple entities through the one action (also there would be no way to turn the lights state to its previous state using a variable as service data only supports On and Off)!

Thanks

I am managing to track states ATM with the built in features… but it is incredibly tedious, and hass-variables appears to be just as bad… as in you also have to edit yaml files to add the variables.