But my problem is that when I dim lights by 10% step and accidentally dim all the way to 0% then light goes off and then i need turn again on but now lights goes 100% again because i use default brightness 100%.
Is there any way to stop light going accidentally off when dimming down?
The way I would do it is to insert a condition before the service call that performs the 10% dimming. The condition would check if the light’s current brightness is greater than or equal to 15%. If it is then it would permit executing the service call (which would reduce brightness to no less than 5%). If it’s already lower than 15%, the service call is not executed.