Need help with a light featuring a 3-step dimmer

I installed a new kitchen light which incorporates what I’d call a poor-man’s-dimmer-control, meaning that on every power-on it switches the brightness down. In 3 steps it goes from full to medium to dim, then back to full, etc. Also, after a time out of +/- 5 secs after switching off the light the sequence resets such that the next poweron will always give full blast, regardless of the previous dimmer setting. Looking around for some extra lights I noticed quite a few being based on the same principle - sometimes for the dimming function, sometimes for the color temperature function, etc. So I gather I cannot be the first or the only one facing this challenge …
So, before I start building a needlessly convoluted and probably far from idiotproof set of scripts, helpers and automations, I thought I’d reach out to this wonderful community.
Can anyone point me to a useful integration, dashboard entry, template, script, … to facilitate handling this device ?
Thanking in advance for any enlightenment :wink:

something like this?

Thx for chiming in @armedad, but I fear that this BP does not fit my exact situation.
For one: my light switch is of the classic toggle type : down for on, up for off. At least that’s how it originally was before I incorporated a zwave switch inside which works in parallel with the physical switch, making the up/down lose their fixed meanings. That aside, because this poses no real problem.
The thing however is that the light itself is not a smart one, so what little ‘smartness’ it has is restricted to its own operation : it obviously remembers its own brightness current setting, allowing it to auto-switch to the next dim setting when re-powered on before it times out on this ‘memory’, but there is no access whatsover to this internal setting - which I therefore must mimic myself, tricky as that is.
When done right, all I have to do is issue the appropriate number of quick off/on cycles to get to a certain dim level.
Doable, but rather convoluted and a bit tricky to get it to be foolproof at all times.
So, I was hoping for some of you geniuses to point me to an existing solution, or at least to guide me towards the simplest possible way to create a light entity with the needed functionality built-in (a bit like the entity for fans having 3 or 4 speed settings ?) …

so that means there’s no way for you to guarantee that you know what the dimness state is? but if it’s not been pressed for 5 seconds, then all you know is that the next press will put it to full brightness.

so… what is it that you want the automation to do? could you pseudo code it for give the logic of what you want really explicitly?

You’re correct. There is no feedback at all from the light itself. All I have to go on is the operation & feedback of the zwave switch. That being said, I’m not so much after a specific automation but rather after some custom integration, or a template combined with the necessary script(s), or … ? to make this device look like its a smart one, to which I can then apply the standard light-related services, especially the dimmer-related ones.