Homekit: Calculated value to control a lamp’s intensity
Is there any way to use Shortcuts and send a calculated value to control the intensity of a smart bulb in HomeKit?
I want a lamp to slowly fade out after having been on for a while. In an ideal world I would like Shortcuts to set a variable n to the current intensity of the lamp ( 0 to 100% ) and then go round in a loop n times reducing the intensity by 1% and waiting for a while before looping back until it reaches zero.
On an associated topic, can Shortcuts specify the RGB settings of a bulb, or is the only way to set the intensity and colour manually with the sliders and colour pickers for a given setting?
HomePod mini