Template light with unknown current brightness and infinite levels

I need to build a template light to control a physical lamp that can assume “infinite” brightness levels and doesn’t return the current brightness. I have a rest endpoint for brightness up and another one for brightness down.

I tried handling the current brightness using a local variable of a template light, but due to the infinite levels, this just doesn’t work: after a few uses (go up and down the brightness levels) the local variable becomes out of sync with the actual brightness of the lamp.

What would be the best way to model such light?

In my mind, I just need a template light that has a couple of buttons (brightness up and brightness down) without presenting any brightness level.

The same light has also three color temperature levels, that being discrete, I can handle with a local variable.


Do you have a rest endpoint for specifying a discrete level?

Do you have a rest endpoint for current brightness feedback?

If not then there is no way to prevent them becoming out of sync, especially if the light can be controlled outside of HA.

No, I can only do light_up and light_down.

I am giving up on storing and showing in HA the current brightness, what I need is a sort of template light that expose brightness_up and brightness_down instead of set_brightness. Without any brightness level attribute.

I am wondering if such a variant of template light exists (maybe as a custom component).