Hello,
I would like to be able to create a menu and sub menu system with a button. The idea is after detecting an action on the button, HA waits for example 5s for another action on this button to determine which script to perform. This is to be able to perform many more actions with a single button.
here is the pseudo-code :
when (action1 == single_action ) {
action2 = (wait 5s for second action )
switch ( action2 ) {
single_action : execute_script1;
break;
double_action : execute_script2;
break;
hold_action : execute_script3;
break;
many_action: execute_script4;
break;
no_action: execute_script5;
}
}
Thank you for your help.