I think the title says it all but to be sure I explain myself: I have seen such a system where holding a physical button would increase brightness as long as you hold.
Tapping would switch off and toggle brings back the previous brightness level.
Holding again would inverse the increase, thus really dimming until released or 0%.
Is this possible, with a automation or a script or any other way?
While there is a tap action that you could use to toggle the light and a hold action to begin dimming or brightening there is no release action to stop dimming or brightening. So I can’t see how this could be done.
I have picked up ‘brightness_decrease’ some time ago from some thread here but that code did something else.
Now I was wondering if this could be used the way I explained.
Even if the light is off, doesn’t increasing the brightness turn it on anyway?
That’s what I experience with the bulbs (filament bulb w. Tasmota & RGB bulb w. Tuya) and the light card.
So some automation/scene/script/… ?could? be used to when holding to go from 0% to 100%.
I imagine that the 0% and 100% can be used as starting state to know whether the brightness should be increased or decreased.
If released in between and held again, for instance always decrease.
Toggling with a tap would go between off and on (with last used dimmed state), this is what happens anyway.
Reading the original post they state holding a physical button. Now I am unaware of what that button is but it my very well send a release state.
I have done this in Esphome sending a hold event and a release event on a physical button, but through my attempts I have been unable to sort the dimming part.
Changed the title to be more clear; I meant a Lovelace (soft) button/card.
@tom_l: you’re right, didn’t realize that the release action is necessary.
So that ‘Momentary button’ what’s needed. (at least for me )
Strange that this ability has not been implemented before…