Shelly dimmer, set brightness when dimmer is off

Hi!
Unfortunately, the default integration does not allow you to set your shelly dimmer’s brightness when it’s off. This has to be done by a call directly to the shelly. I managed to get the following working:

By sending the following:
http://192.168.68.117/light/0?brightness=35

I want to make this reusable for my other shelly’s.

I added the following rest-command to my configuration:

rest_command:
  lightbrightness_2:
     url: "http://192.168.68.117/light/0?brightness=35"

Is this something that I will have to manually recreate for all of my shelly’s, as well as for this shelly (one for brightness at 50%, one at 100%)? I can’t seem to figure it out!

Write it as a script, with IP and brightness as variables?