[Gelöst] Frage zu Wait in DOIF

Begonnen von Jogi, 24 August 2018, 12:51:47

Vorheriges Thema - Nächstes Thema

Jogi

Hallo,
ich habe folgendes DOIF:
(([Helligkeit:Lux] <100) and [VUDuo2] eq "on" and [17:01-20:15] and [Alarmanalge] eq "off") (set LED_Wohnz_Decke rgb 11D8DB)## 1
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "on" and [20:15-21:00] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb 0A8282) ## 2
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "on" and [21:00-22:00] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb 000073) ## 3
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "on" and [22:00-22:30] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb 0000C2) ## 4
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "on" and [22:30-06:00] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb 000078) ## 5
## VUDuo2 absent:
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "off" and [20:00-21:00] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb 820C27) ## 6
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "off" and [21:00-22:00] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb 821A5C) ## 7
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "off" and [22:00-22:45] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb AA5BEF) ## 8
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "off" and [22:45-06:00] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb 0000C2) ## 9
## VUDuo2 off:
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "absent" and [20:00-21:00] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb 820C27) ## 10
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "absent" and [21:00-22:00] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb 821A5C) ## 11
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "absent" and [22:00-22:45] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb AA5BEF) ## 12
DOELSEIF (([Helligkeit:Lux] <100) and [VUDuo2] eq "absent" and [22:45-06:00] and [Alarmanlage] eq "off") (set LED_Wohnz_Decke rgb 0000C2) ## 14
## Alarmanlage sharf:
DOELSEIF (([Helligkeit:Lux] <100) and [17:00-08:00] and [Alarmanlage] eq "on") (set LED_Wohnz_Decke rgb ff0000 5)
(set LED_Wohnz_Decke off 60) ## 14
DOELSE (set LED_Wohnz_Decke off) ## 15

Wie muss ich jetzt das "Wait" definieren, wenn ich nur im letzten DOELSEIF eine Verzögerung zwischen
(set LED_Wohnz_Decke rgb ff0000 5)
(set LED_Wohnz_Decke off 60)

haben möchte.
Ich bin mir nicht sicher, wie viele Doppelpunkte und Nullen ich brauche.
Wäre das richtig?
wait
0:0:0:0:0:0:0:0:0:0:0:0:0:0,10:0


Oder würde auch das gehen?
wait
::::::::::0,10:

Ich habe "wait" bisher nur einmal genutzt und das war in einem DOIF, in dem in jedem Zweig Verzögerungen waren. Daher war es da ganz anders.

Vielen Dank für Tipps.

Otto123

Hi,

Pro (Sequence -1) einen Doppelpunkt.
Pro (Befehl -1) in jeder Sequence bräuchtest Du ein Komma.

https://commandref.fhem.de/commandref_DE.html#DOIF_wait

Deine Kommentarnummern stimmen nicht, oder Du bist abergläubisch :)
Ich zähle einen Doppelpunkt zuviel.

Gruß Otto
Viele Grüße aus Leipzig  ⇉  nächster Stammtisch an der Lindennaundorfer Mühle
RaspberryPi B B+ B2 B3 B3+ ZeroW,HMLAN,HMUART,Homematic,Fritz!Box 7590,WRT3200ACS-OpenWrt,Sonos,VU+,Arduino nano,ESP8266,MQTT,Zigbee,deconz

Per

Das von Otto gesagte stimmt natürlich, aber aus der Praxis: nimm den letzte DOELSE-Fall ganz nach vorn. Da er der einzige mit Alarmanlage = on ist, geht das hier.
Wenn du dich dann verzählst, ist das nicht so schlimm, fehlende waits werden als 0 genommen.

Jogi

Zitat von: Per am 24 August 2018, 14:52:34
Das von Otto gesagte stimmt natürlich, aber aus der Praxis: nimm den letzte DOELSE-Fall ganz nach vorn. Da er der einzige mit Alarmanlage = on ist, geht das hier.
Wenn du dich dann verzählst, ist das nicht so schlimm, fehlende waits werden als 0 genommen.
Guter Tipp, so werde ich es machen.
Vielen Dank!