Zwei Dummys zu einem zusammenfassen - brauche Hilfe!

Begonnen von tilly001, 14 Oktober 2015, 13:17:28

Vorheriges Thema - Nächstes Thema

tilly001

Hallo,

Ich möchte aus zwei Dummys einen machen aber bekomme es nicht hin.

1.

define tor_auf dummy
attr tor_auf devStateIcon on:fts_garage_door_10
attr tor_auf group Schalter
attr tor_auf room Garage
attr tor_auf setList on off
define rauf_Tor_Garage notify tor_auf:on {system('/home/pi/rauf.sh&');;}


2.


define tor_zu dummy
attr tor_zu devStateIcon on:fts_garage_door_100
attr tor_zu group Schalter
attr tor_zu room Garage
attr tor_zu setList on off
define runter_Tor_Garage notify tor_zu:on {system('/home/pi/runter.sh&');;}


Soll zusammen hier laufen:


define tor_umschalter dummy
attr tor_umschalter room Garage
attr tor_umschalter setList on off
define Ntor_umschalter notify if ("$tor_umschalter" ne "off") {\
system('/home/pi/rauf.sh&')\
}\
else {\
system('/home/pi/runter.sh&')\
}\
}


Wer kann mir helfen?

marvin78

tor_umschalter {
if ($EVENT ne "off") {
  system('/home/pi/rauf.sh&');
}
else {
  system('/home/pi/runter.sh&');
}
}


Code für den DEF Bereich des notifys.

Dazu noch: Bitte dringend die commandref zu notify lesen!

moonsorrox

devStateIcon Auf:fts_garage_door_10 Zu:fts_garage_door_100
eventMap on:Auf off:Zu
webCmd Auf:Zu
Intel-NUC i5: FHEM-Server 6.1 :: Perl v5.18.2

Homematic: HM-USB-CFG2,HM-CFG-LAN Adapter, HM-LC-BL1-FM, HM-LC-Sw1PBU-FM, HM-LC-Sw1-PI-2, HM-WDS10-TH-O, HM-CC-TC, HM-LC-SW2-FM

tilly001