Ich sitze bei der Programmierung eines Doppelklicks per Homematic Wired Taster.
Code: Alles auswählen
integer klick = 3;
! ####################### Zähler entsprechend der Anzahl Tastendrücke verändern #################
integer obj = dom.GetObject("doppelklick"); ! ######## rausholen
integer xyz = obj.State();
if (xyz == klick) {
obj.Variable(1);
}
else {
xyz = xyz + 1; ! ######## incrementieren
obj.Variable(xyz); ! ######### reinschreiben
}
! ################################################################################################
! ### Systemvariable doppelklick holen ###
var doppelklick = dom.GetObject("doppelklick");
! ###################### Einfachklick ######################
if (doppelklick.State()==2){
! ### Schalte Licht ... Ein ####
var switch = dom.GetObject("Dunstabzug Licht:1");
if (switch.State()==0){
switch.State(1);
}
else
{
switch.State(0);
}
}
! ###################### Doppelklickklick ######################
if (doppelklick.State()==3){
! ### Schalte Licht ... Ein ####
var switch = dom.GetObject("Dunstabzug Stufe1:2");
if (switch.State()==0){
switch.State(1);
}
else
{
switch.State(0);
}
}
! ##### FERTIG #####
Lg Markus