**Hello,
I’m making this request because I’d like to retrieve the state of a lamp (color and lighting mode, fixed for example), store it somewhere, change the lamp’s state (change color and blinking), then put it back to its initial state.
**
Currently I don’t see how
Hi @Psoy ![]()
You can already do this with a « Control device » action and a « virtual » device created in the MQTT integration.
- You create a device of the same type as the device whose state you want to save
- You perform a « Get last state »
- You perform a « Control device » with the value coming from « Get last state »
- You restore whenever you want with a combo « Get last state » + « Control device »
Don’t hesitate if you have any questions ![]()
3 Likes
These virtual devices are really very useful (I use many of them) but I always feel that their use goes a bit unnoticed, which is a shame!
Hello @pierre-gilles, @guim31
I’ll look into that, but it’s true that I didn’t think of using a virtual
1 Like
@Psoy I’ve transformed your post into a question ![]()
1 Like
Thank you @pierre-gilles