One method is to use the app Countdown.
Create a countdown timer. Then a flow WHEN light on THEN start a timer of 7200seconds.
Another flow where WHEN light off manually THEN the timer resets to 0.
And one last flow WHEN timer reaches 0 THEN turn off light.
There are other methods, I am sure…
Here is the app: