Please add variables programming and timers possibility

Cold you please add possibility to create, set and reset variables?
And timed variables?
For example, I would like to do something like this:
If I press power button, and in 1s time if i press hue button on dimmer switch, some lights will go on, but if it will happen after 2s - different light will go on.
I need actions based on variables, checking variables, setting and resetting and timers.