home-assistant/node_red_diele_nachtbeleuchtung.json
2025-04-25 15:31:49 +02:00

341 lines
8.8 KiB
JSON

[
{
"id": "23b8f90b282ac8a2",
"type": "group",
"z": "a1055886e0cbd337",
"name": "Diele Nachtbeleuchtung",
"style": {
"fill": "#bfdbef",
"label": true
},
"nodes": [
"ec44baea08cc2923",
"c51f9311d8d05015",
"c8a63c6fa6d37a51",
"5b5ec57984037a5c",
"f0c5e4339b494c3a",
"43d024d394d94663",
"00b3ef7322366374",
"87806c641c86c3d9",
"14c3a212afc4cd78"
],
"x": 14,
"y": 419,
"w": 1412,
"h": 142
},
{
"id": "ec44baea08cc2923",
"type": "server-state-changed",
"z": "a1055886e0cbd337",
"g": "23b8f90b282ac8a2",
"name": "Diele Bewegung erkannt",
"server": "387b3091.65c5",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.diele_bewegungsmelder_bewegung"
],
"substring": [],
"regex": []
},
"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": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 150,
"y": 500,
"wires": [
[
"c51f9311d8d05015",
"00b3ef7322366374"
],
[]
]
},
{
"id": "c51f9311d8d05015",
"type": "api-current-state",
"z": "a1055886e0cbd337",
"g": "23b8f90b282ac8a2",
"name": "Diele Bewegungsmelder Helligkeit",
"server": "387b3091.65c5",
"version": 3,
"outputs": 2,
"halt_if": "50",
"halt_if_type": "num",
"halt_if_compare": "lte",
"entity_id": "sensor.diele_bewegungsmelder_helligkeit",
"state_type": "num",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 440,
"y": 460,
"wires": [
[
"c8a63c6fa6d37a51"
],
[]
]
},
{
"id": "c8a63c6fa6d37a51",
"type": "time-range-switch",
"z": "a1055886e0cbd337",
"g": "23b8f90b282ac8a2",
"name": "Nur Nachts 20-8",
"lat": "51.2115333",
"lon": "6.7448851",
"startTime": "20:00",
"endTime": "08:00",
"startOffset": 0,
"endOffset": 0,
"x": 800,
"y": 460,
"wires": [
[
"5b5ec57984037a5c"
],
[]
]
},
{
"id": "5b5ec57984037a5c",
"type": "api-call-service",
"z": "a1055886e0cbd337",
"g": "23b8f90b282ac8a2",
"name": "Diele und Bad LED Streifen AN",
"server": "387b3091.65c5",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.led_spiegel",
"light.led_streifen"
],
"labelId": [],
"data": "{\"brightness\":\"40\"\t,\"profile\":\"relax\"}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_on",
"x": 1270,
"y": 460,
"wires": [
[]
]
},
{
"id": "f0c5e4339b494c3a",
"type": "api-call-service",
"z": "a1055886e0cbd337",
"g": "23b8f90b282ac8a2",
"name": "Diele und Bad LED Streifen AUS",
"server": "387b3091.65c5",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"light.led_spiegel",
"light.led_streifen"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "light",
"service": "turn_off",
"x": 1270,
"y": 520,
"wires": [
[]
]
},
{
"id": "43d024d394d94663",
"type": "delay",
"z": "a1055886e0cbd337",
"g": "23b8f90b282ac8a2",
"name": "",
"pauseType": "delayv",
"timeout": "3",
"timeoutUnits": "minutes",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1020,
"y": 520,
"wires": [
[
"f0c5e4339b494c3a"
]
]
},
{
"id": "00b3ef7322366374",
"type": "time-range-switch",
"z": "a1055886e0cbd337",
"g": "23b8f90b282ac8a2",
"name": "Nur Nachts 20-8",
"lat": "51.2115333",
"lon": "6.7448851",
"startTime": "20:00",
"endTime": "08:00",
"startOffset": 0,
"endOffset": 0,
"x": 380,
"y": 520,
"wires": [
[
"87806c641c86c3d9"
],
[]
]
},
{
"id": "87806c641c86c3d9",
"type": "api-current-state",
"z": "a1055886e0cbd337",
"g": "23b8f90b282ac8a2",
"name": "Get Timer Value",
"server": "387b3091.65c5",
"version": 3,
"outputs": 2,
"halt_if": "0",
"halt_if_type": "num",
"halt_if_compare": "gt",
"entity_id": "input_number.diele_timer_nachtlicht",
"state_type": "num",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 600,
"y": 520,
"wires": [
[
"14c3a212afc4cd78"
],
[]
]
},
{
"id": "14c3a212afc4cd78",
"type": "function",
"z": "a1055886e0cbd337",
"g": "23b8f90b282ac8a2",
"name": "Min2Millisekunden",
"func": "// Annahme: msg.payload enthält den Wert in Minuten\nlet minuten = msg.payload;\nmsg.delay = minuten * 60 * 1000; // Minuten → Millisekunden\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 810,
"y": 520,
"wires": [
[
"43d024d394d94663"
]
]
},
{
"id": "387b3091.65c5",
"type": "server",
"name": "Home Assistant",
"addon": true
}
]