Hier ein Listing eines DOIF-Kommandos :
Internals:
DEF ([LichtWohnRemote:cSceneSet] == 2 and [?WohnKaktus] eq "on" ) (set WohnAll off) DOELSEIF ([LichtWohnRemote:cSceneSet] == 2 and [?WohnKaktus] eq "off" ) (set WohnAll on)
NAME LichtWohnRemote2
NR 225
NTFY_ORDER 50-LichtWohnRemote2
STATE cmd_1
TYPE DOIF
READINGS:
2017-12-17 22:18:41 Device LichtWohnRemote
2017-12-17 22:18:41 cmd 1
2017-12-17 22:18:41 cmd_event LichtWohnRemote
2017-12-17 22:18:41 cmd_nr 1
2017-12-17 22:18:41 e_LichtWohnRemote_cSceneSet 2
2017-12-17 22:18:41 state cmd_1
Regex:
condition:
0 ReadingValDoIf($hash,'LichtWohnRemote','cSceneSet') == 2 and InternalDoIf($hash,'WohnKaktus','STATE') eq "on"
1 ReadingValDoIf($hash,'LichtWohnRemote','cSceneSet') == 2 and InternalDoIf($hash,'WohnKaktus','STATE') eq "off"
devices:
0 LichtWohnRemote
1 LichtWohnRemote
all LichtWohnRemote
do:
0:
0 set WohnAll off
1:
0 set WohnAll on
2:
helper:
DOIF_Readings_events
DOIF_eventas
globalinit 1
last_timer 0
sleeptimer -1
internals:
0 WohnKaktus:STATE
1 WohnKaktus:STATE
all WohnKaktus:STATE
itimer:
readings:
0 LichtWohnRemote:cSceneSet
1 LichtWohnRemote:cSceneSet
all LichtWohnRemote:cSceneSet
uiState:
uiTable:
Attributes:
cmdpause 1:1
room Wohnzimmer
Dabei ist WohnAll ein Device vom Type LightScene mit den Moeglichkeiten on oder off
WohnKaktus ist ein MItglied der Scene.
Obiges DOIF funktioniert, aber :
Ersetzt ich in obiger Definition WohnKaktus mit der Scene, WohnAll, teste also auf
([LichtWohnRemote:cSceneSet] == 2 and [?WohnAll] eq "on" )
dann geht gar nichts.
Wieso ? Oder ist ein Scene-Device in einem DOIF nicht zugelassen ?
ZitatOder ist ein Scene-Device in einem DOIF nicht zugelassen ?
Sollte doch.
Zeig mal ein "list" von WohnAll bitte.
Sollte das etwas mit dem eventMap zu tun haben ?
Internals:
DEF LichtWohnKamin WohnKaktus WohnVitrine WohnPflanze LichtWohnTuer LichtWohnRegal
HAS_DataDumper 1
HAS_JSON 1
NAME WohnAll
NR 160
NTFY_ORDER 50-WohnAll
STATE Initialized
TYPE LightScene
CONTENT:
LichtWohnKamin 1
LichtWohnRegal 1
LichtWohnTuer 1
WohnKaktus 1
WohnPflanze 1
WohnVitrine 1
READINGS:
2017-12-18 09:53:33 state all on
SCENES:
devices:
LichtWohnKamin
LichtWohnRegal
LichtWohnTuer
WohnKaktus
WohnPflanze
WohnVitrine
Attributes:
eventMap /all off:off/all on:on/
room Wohnzimmer
webCmd on:off
ZitatSTATE Initialized
Das ist weder "on" noch "off"
Danke, ja, sehe ich jetzt auch.
Hab ich nie gecheckt, da ich davon ausgegangen bin, dass die Devices nach einem Neustart den alten Zustand haben.
Das ist auch so, aber offenbar nicht fuer eine LightScene.
Ob das jetzt ein Fehler ist, oder so sein soll, weiss ich nicht.
Da hilft mir letztlich auch ein beim Start erzwungener Zustand nicht weiter; es gibt keinen wohldefinierten Startzustand fuer diese Device.
Daher bleibe ich erstmal bei meiner (Not)Loesung.
Du kannst vielleicht mit [?WohnAll:state] eq "all on"
probieren.
Danke, gute Idee.
Internal STATE wird beim Neustart immer auf Initialized gesetzt,
Readings state wird aber wieder korrekt auf den letzten Stand gesetzt.