Hallo liebes Forum,
ich versuche einen Sonnenschutz mit meinen Rollläden zu realisieren.
Das Herunterfahren der Motoren klappt bereits.
Es geht um die Prüfung für das verweilen im aktuellen Status oder das wieder Hochfahren der Motoren.
Mein Trigger ist die Helligkeitsänderung. Wenn die aktuelle Helligkeit > Vorgabewert, dann soll so lange für 20 Minuten gewartet werden, bis die aktuelle Helligkeit mindestens 20 Minuten unterschritten ist.
Da mein Trigger aber die Helligkeitsänderung ist, fängt der untere Timer immer wieder neu an…
Ich suche als etwas um auf “status changed” mit Eingang zu triggern oder jede andere Lösung.
[
{
"id": "9807b3431ebf222b",
"type": "tab",
"label": "Flow 4",
"disabled": false,
"info": "",
"env": []
},
{
"id": "deba962c14c02106",
"type": "api-current-state",
"z": "9807b3431ebf222b",
"name": "Ist aktuelle Helligkeit > $helligkeit",
"server": "9a63205d.785ca",
"version": 3,
"outputs": 2,
"halt_if": "$number($entities('input_number.variable_helligkeit').state)",
"halt_if_type": "jsonata",
"halt_if_compare": "gt",
"entity_id": "sensor.wetterstation_pro_beleuchtungsstarke",
"state_type": "num",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
},
{
"property": "a",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "b",
"propertyType": "msg",
"value": "$number($entities('input_number.variable_helligkeit').state)",
"valueType": "jsonata"
}
],
"for": "20",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 820,
"y": 440,
"wires": [
[
"6cab3baf05f34b99",
"b034f23144537e8e",
"9953a127ea50a6a0"
],
[
"0d83703911b45fb7",
"f1a0187bf4ec9def",
"f5416c5ca996bc9c"
]
]
},
{
"id": "6cab3baf05f34b99",
"type": "ha-wait-until",
"z": "9807b3431ebf222b",
"name": "20-Minuten-warten",
"server": "9a63205d.785ca",
"version": 2,
"outputs": 2,
"entityId": "sensor.wetterstation_pro_beleuchtungsstarke",
"entityIdFilterType": "exact",
"property": "attributes.current.state",
"comparator": "lt",
"value": "0.4",
"valueType": "num",
"timeout": "20",
"timeoutType": "num",
"timeoutUnits": "minutes",
"checkCurrentState": true,
"blockInputOverrides": true,
"outputProperties": [],
"entityLocation": "data",
"entityLocationType": "none",
"x": 1130,
"y": 320,
"wires": [
[
"28cc34404af428c1"
],
[
"deba962c14c02106"
]
]
},
{
"id": "9e66d23b59c68e5c",
"type": "inject",
"z": "9807b3431ebf222b",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 300,
"y": 400,
"wires": [
[
"e9fe6774ac4d3d18"
]
]
},
{
"id": "0d83703911b45fb7",
"type": "ha-wait-until",
"z": "9807b3431ebf222b",
"name": "20-Minuten-warten",
"server": "9a63205d.785ca",
"version": 2,
"outputs": 2,
"entityId": "sensor.wetterstation_pro_beleuchtungsstarke",
"entityIdFilterType": "exact",
"property": "attributes.current.state",
"comparator": "lt",
"value": "0.4",
"valueType": "num",
"timeout": "20",
"timeoutType": "num",
"timeoutUnits": "minutes",
"checkCurrentState": true,
"blockInputOverrides": true,
"outputProperties": [],
"entityLocation": "data",
"entityLocationType": "none",
"x": 1130,
"y": 540,
"wires": [
[],
[
"28cc34404af428c1"
]
]
},
{
"id": "b367a846fdb60810",
"type": "server-state-changed",
"z": "9807b3431ebf222b",
"name": "Trigger Änderung Helligkeit",
"server": "9a63205d.785ca",
"version": 5,
"outputs": 1,
"exposeAsEntityConfig": "",
"entityId": "sensor.wetterstation_pro_beleuchtungsstarke",
"entityIdType": "exact",
"outputInitially": false,
"stateType": "num",
"ifState": "",
"ifStateType": "num",
"ifStateOperator": "is",
"outputOnlyOnStateChange": false,
"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": 250,
"y": 520,
"wires": [
[
"383f7664d8a9ed5b",
"e9fe6774ac4d3d18"
]
]
},
{
"id": "383f7664d8a9ed5b",
"type": "debug",
"z": "9807b3431ebf222b",
"name": "debug 181",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 490,
"y": 560,
"wires": []
},
{
"id": "f1a0187bf4ec9def",
"type": "api-call-service",
"z": "9807b3431ebf222b",
"name": "20-min-timer zurücksetzen",
"server": "9a63205d.785ca",
"version": 5,
"debugenabled": true,
"domain": "timer",
"service": "start",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.20_min_timer"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": true,
"outputProperties": [],
"queue": "none",
"x": 1160,
"y": 600,
"wires": [
[]
]
},
{
"id": "b034f23144537e8e",
"type": "api-call-service",
"z": "9807b3431ebf222b",
"name": "20-min-timer zurücksetzen",
"server": "9a63205d.785ca",
"version": 5,
"debugenabled": true,
"domain": "timer",
"service": "start",
"areaId": [],
"deviceId": [],
"entityId": [
"timer.20_min_timer"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": true,
"outputProperties": [],
"queue": "none",
"x": 1160,
"y": 260,
"wires": [
[]
]
},
{
"id": "9953a127ea50a6a0",
"type": "debug",
"z": "9807b3431ebf222b",
"name": "debug 182",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 1110,
"y": 400,
"wires": []
},
{
"id": "f5416c5ca996bc9c",
"type": "debug",
"z": "9807b3431ebf222b",
"name": "debug 183",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 1110,
"y": 480,
"wires": []
},
{
"id": "e9fe6774ac4d3d18",
"type": "api-current-state",
"z": "9807b3431ebf222b",
"name": "Ist Sonnenschutz on?",
"server": "9a63205d.785ca",
"version": 3,
"outputs": 2,
"halt_if": "true",
"halt_if_type": "bool",
"halt_if_compare": "is",
"entity_id": "input_boolean.sonnenschutz",
"state_type": "habool",
"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": 520,
"y": 460,
"wires": [
[
"deba962c14c02106",
"a4dad458c47d7a77"
],
[
"03c993e072736bb8"
]
]
},
{
"id": "03c993e072736bb8",
"type": "debug",
"z": "9807b3431ebf222b",
"name": "debug 184",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 750,
"y": 520,
"wires": []
},
{
"id": "a4dad458c47d7a77",
"type": "debug",
"z": "9807b3431ebf222b",
"name": "debug 185",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "true",
"targetType": "full",
"statusVal": "payload",
"statusType": "auto",
"x": 750,
"y": 380,
"wires": []
},
{
"id": "28cc34404af428c1",
"type": "api-call-service",
"z": "9807b3431ebf222b",
"name": "Test",
"server": "9a63205d.785ca",
"version": 5,
"debugenabled": false,
"domain": "persistent_notification",
"service": "create",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\"message\":\"Test.\",\"title\":\"Node-Red Ausgabe\",\"notification_id\":1}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1410,
"y": 420,
"wires": [
[]
]
},
{
"id": "9a63205d.785ca",
"type": "server",
"name": "Home Assistant",
"addon": true
}
]