From d9215e8633463a2e391b6651f19e3814bd07ac73 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Sun, 23 Mar 2025 13:45:05 -0400 Subject: [PATCH] Improve node status on Tina Work node in presence flow --- flows.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flows.json b/flows.json index e6c5973..ea8a559 100644 --- a/flows.json +++ b/flows.json @@ -10634,7 +10634,7 @@ "type": "function", "z": "3abb5ae57afb4761", "name": "Processing", - "func": "const states = global.get('homeassistant.homeAssistant.states')\nconst workEndZone = states['binary_sensor.tina_work_end_zone'].state\nconst tinawork = msg.tinawork\n\nif (tinawork === 'on' && workEndZone === 'on') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Activated\"})\n return[msg,null]\n} else if (tinawork === 'off') {\n node.status({fill:\"yellow\",shape:\"dot\",text:\"No Work Today\"})\n return null\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"We fucked up\"})\n node.warn(\"Tina presence flow encountered a situation we did not account for\")\n return[null,msg]\n}", + "func": "const states = global.get('homeassistant.homeAssistant.states')\nconst workEndZone = states['binary_sensor.tina_work_end_zone'].state\nconst tinawork = msg.tinawork\n\nif (tinawork === 'on' && workEndZone === 'on') {\n node.status({fill:\"green\",shape:\"dot\",text:\"Activated\"})\n return[msg,null]\n} else if (tinawork === 'on' && workEndZone === 'off') {\n node.status({fill:\"yellow\",shape:\"dot\",text:\"Not time to leave yet\"})\n return null\n} else if (tinawork === 'off') {\n node.status({fill:\"yellow\",shape:\"dot\",text:\"No Work Today\"})\n return null\n} else {\n node.status({fill:\"red\",shape:\"ring\",text:\"We fucked up\"})\n node.warn(\"Tina presence flow encountered a situation we did not account for\")\n return[null,msg]\n}", "outputs": 2, "timeout": "", "noerr": 0,