That data is available in the history array. I use it in the ASL code so you can see it for an example. In my code, I have a switch that can be used to have multiple results. Single tap ON, double tap ON, single tap OFF, double tap OFF. These all result in slightly different actions from HG and all rely on knowing how long of a gap between the current and last actuation of the switch was as well as whether they were both the same command or not.