Danke, die Idee mit dem Detached Switch war gut! Ich habe damit ein bissl rumprobiert und mich letztlich entschieden, die damit verbundene Logik als State Machine in Home Assistant/Node Red zu erstellen.
Hat den Nachteil, dass das Licht nur per Schalter angeht, wenn Home Assistant funktioniert. Das ist verschmerzbar, da die Verfügbarkeit von Home Assistant sehr nah an 100% liegt. Vorteil: beide Lichter gehen exakt gleichzeitig an und ich habe einen Schalter in Home Assistant, mit dem ich sie auch für weitere Automatisierungen wie ein einziges Licht nutzen kann.
[
{
"id": "ad8515d7de42cafd",
"type": "server-state-changed",
"z": "2915acb8b995b9cf",
"name": "",
"server": "5a3777c7.b71588",
"version": 5,
"outputs": 1,
"exposeAsEntityConfig": "",
"entityId": "binary_sensor.licht_eg_flur_input_0_input",
"entityIdType": "exact",
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 250,
"y": 5960,
"wires": [
[
"7d39aedc9b4540ef"
]
]
},
{
"id": "4c52fbff207fe606",
"type": "server-state-changed",
"z": "2915acb8b995b9cf",
"name": "",
"server": "5a3777c7.b71588",
"version": 5,
"outputs": 1,
"exposeAsEntityConfig": "",
"entityId": "binary_sensor.licht_eg_garderobe_input_0_input",
"entityIdType": "exact",
"outputInitially": false,
"stateType": "str",
"ifState": "",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 280,
"y": 6020,
"wires": [
[
"7d39aedc9b4540ef"
]
]
},
{
"id": "8b96bcf2f99a056c",
"type": "state-machine",
"z": "2915acb8b995b9cf",
"name": "",
"triggerProperty": "payload",
"triggerPropertyType": "msg",
"stateProperty": "payload",
"statePropertyType": "msg",
"initialDelay": "0",
"persistOnReload": true,
"outputStateChangeOnly": true,
"throwException": false,
"states": [
"off",
"on"
],
"transitions": [
{
"name": "toggle",
"from": "on",
"to": "off"
},
{
"name": "toggle",
"from": "off",
"to": "on"
},
{
"name": "on",
"from": "off",
"to": "on"
},
{
"name": "off",
"from": "on",
"to": "off"
}
],
"x": 500,
"y": 6140,
"wires": [
[
"0dc92aa8db156e4b"
]
]
},
{
"id": "50a3bcc8f368070d",
"type": "inject",
"z": "2915acb8b995b9cf",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "on",
"payloadType": "str",
"x": 110,
"y": 6100,
"wires": [
[
"8b96bcf2f99a056c"
]
]
},
{
"id": "b563a903aaa2c89a",
"type": "inject",
"z": "2915acb8b995b9cf",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "off",
"payloadType": "str",
"x": 110,
"y": 6140,
"wires": [
[
"8b96bcf2f99a056c"
]
]
},
{
"id": "3e53de8242e98ddb",
"type": "inject",
"z": "2915acb8b995b9cf",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "toggle",
"payloadType": "str",
"x": 110,
"y": 6180,
"wires": [
[
"8b96bcf2f99a056c"
]
]
},
{
"id": "0dc92aa8db156e4b",
"type": "switch",
"z": "2915acb8b995b9cf",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 650,
"y": 6140,
"wires": [
[
"0676987b9cef207e",
"abd1d01360e618d4"
],
[
"8417e502256b43b8"
]
]
},
{
"id": "48764c9766fa6b04",
"type": "api-call-service",
"z": "2915acb8b995b9cf",
"name": "",
"server": "5a3777c7.b71588",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.licht_eg_flur"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1220,
"y": 6040,
"wires": [
[]
]
},
{
"id": "90a15ffdb0cbe246",
"type": "api-call-service",
"z": "2915acb8b995b9cf",
"name": "",
"server": "5a3777c7.b71588",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.licht_eg_garderobe"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1220,
"y": 6100,
"wires": [
[]
]
},
{
"id": "68c54b151cc1ab57",
"type": "api-call-service",
"z": "2915acb8b995b9cf",
"name": "",
"server": "5a3777c7.b71588",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.licht_eg_flur"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1220,
"y": 6180,
"wires": [
[]
]
},
{
"id": "2725331f92224956",
"type": "api-call-service",
"z": "2915acb8b995b9cf",
"name": "",
"server": "5a3777c7.b71588",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.licht_eg_garderobe"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1220,
"y": 6240,
"wires": [
[]
]
},
{
"id": "7d39aedc9b4540ef",
"type": "change",
"z": "2915acb8b995b9cf",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "toggle",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 5980,
"wires": [
[
"8b96bcf2f99a056c"
]
]
},
{
"id": "0676987b9cef207e",
"type": "api-call-service",
"z": "2915acb8b995b9cf",
"name": "",
"server": "5a3777c7.b71588",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.licht_flur_gesamt"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 920,
"y": 6080,
"wires": [
[
"48764c9766fa6b04",
"90a15ffdb0cbe246"
]
]
},
{
"id": "8417e502256b43b8",
"type": "api-call-service",
"z": "2915acb8b995b9cf",
"name": "",
"server": "5a3777c7.b71588",
"version": 5,
"debugenabled": false,
"domain": "input_boolean",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.licht_flur_gesamt"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 920,
"y": 6200,
"wires": [
[
"68c54b151cc1ab57",
"2725331f92224956"
]
]
},
{
"id": "98ad6a70bb84df43",
"type": "server-state-changed",
"z": "2915acb8b995b9cf",
"name": "",
"server": "5a3777c7.b71588",
"version": 5,
"outputs": 2,
"exposeAsEntityConfig": "",
"entityId": "input_boolean.licht_flur_gesamt",
"entityIdType": "exact",
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": true,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 220,
"y": 6240,
"wires": [
[
"8b96bcf2f99a056c"
],
[
"8b96bcf2f99a056c"
]
]
},
{
"id": "abd1d01360e618d4",
"type": "delay",
"z": "2915acb8b995b9cf",
"name": "",
"pauseType": "delay",
"timeout": "300",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 990,
"y": 5900,
"wires": [
[
"f2dd8e3f8b5c3c13"
]
]
},
{
"id": "f2dd8e3f8b5c3c13",
"type": "change",
"z": "2915acb8b995b9cf",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "off",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 990,
"y": 5960,
"wires": [
[
"8b96bcf2f99a056c"
]
]
},
{
"id": "5a3777c7.b71588",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": false,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": "30",
"areaSelector": "friendlyName",
"deviceSelector": "friendlyName",
"entitySelector": "friendlyName",
"statusSeparator": "at: ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "h23",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": true
}
]
Alles anzeigen