HS220 trigger from brightness change while off?

The Kasa HS220 switches let you set the brightness on the physical switch while it’s turned off, and the light will be set to that brightness next time you turn it on.

I’m trying to figure out if I can get that brightness value while the light is off. Any ideas?

Hello how did you manage to add the kasa dimmer HS220 to the HA , i am not able to add the switch to HA throws the error related to port 9999 not able to connect