Tasmota PushButton LongPress

I am using a push button on a Tasmota (Sonoff Mini) to switch a light. I use “PulseTime1 700” to switch the light off automatically10mins after pushing the button for a short time. Delayed switching off.

What I am looking for is how I could implement (in Tasmota) the longpress function
(SetOption32 2) in which case I would like to keep the light on for 45mins, e.g. when pressing the button > 2 secs. E.g. set PulseTime1 2800 (=45mins)
This needs to go back to PulseTime1 700 after the light has switched off (either by pressing the button again or after the 45mins timeout)

How can this be implemented on the Tasmota Device. I am not looking for a automation in HA, this I have already done. But the Tasmota switch should do this standalone w/o HA.

Any help much appreciated

Not familiar with pulsetime much but you could try this

Rule1 
on switch1#state=4 do Pulsetime1 2800 endon
on switch1#state=2 do Pulsetime1 700 endon
on PulseTime1#Remaining=0 do Pulsetime1 700 endon
Rule1 1