Hi. I’d like to store the state of an entity (light bulb brightness), change the entity state with an automation and then restore it back to the stored value at the end.
It seems more complex than…
var brightness = entity_id.brightness
Please would someone explain how (code illustrations extra appreciated!)?
Thank you so much! This was exactly the info I needed.
I realise now though that I have another problem too. I am using the Shelly Dimmer 2 to control a light bulb from Home Assistant. The dimmer is able to remember its brightness while being switched off and on repeatedly. However when it is off it will report its brightness to home assistant as “none” (I assume equivalent to zero).
Q) Is there a way to access the saved brightness setting of this device?
The integrations page doesnt talk about it.
Or to put it another way, how would I go about listing all of the services, controls and functions etc associated with this integration?
I had the same issue. the way to donit. is to use the automation to create a scene based off the current states. then once you want to return to that state. just call the scene from the automation