Shelly dimmer, set brightness when dimmer is off

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:

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

I added the following rest-command to my configuration:

     url: ""

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?