diff --git a/flows.json b/flows.json index 5d2b61d..3adda4e 100644 --- a/flows.json +++ b/flows.json @@ -13,11 +13,6 @@ } ] }, - { - "id": "5af82cd4c44df066", - "type": "tab", - "label": "Kitchen" - }, { "id": "10cbea6aaac127cd", "type": "tab", @@ -3202,1153 +3197,6 @@ "x": 2340, "y": 720 }, - { - "id": "970f66c027cf1bda", - "type": "server-state-changed", - "z": "5af82cd4c44df066", - "name": "Kitchen smart switch", - "wires": [ - [ - "d5ae93765e66efa4", - "099d186859d09206", - "3ffbb3073f04796e", - "bf062f43abe3400c", - "86f4b8eb539e8b4f" - ] - ], - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 1, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "sensor.kitchen_switch_action" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "", - "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": 170, - "y": 100 - }, - { - "id": "d5ae93765e66efa4", - "type": "switch", - "z": "5af82cd4c44df066", - "name": "On/Off check", - "wires": [ - [ - "28725aa2f0bc83ef" - ], - [ - "102d2d6180407101" - ] - ], - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "on_press_release", - "vt": "str" - }, - { - "t": "eq", - "v": "off_press_release", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 410, - "y": 100 - }, - { - "id": "deae916e70685ff1", - "type": "comment", - "z": "5af82cd4c44df066", - "name": "Kitchen Lights on/off switch", - "wires": [], - "info": "", - "x": 190, - "y": 60 - }, - { - "id": "099d186859d09206", - "type": "switch", - "z": "5af82cd4c44df066", - "name": "Brightness check - Up press/hold", - "wires": [ - [ - "7c14d1f3a819183d" - ], - [ - "7c14d1f3a819183d" - ] - ], - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "up_press", - "vt": "str" - }, - { - "t": "eq", - "v": "up_hold", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 480, - "y": 340 - }, - { - "id": "6289202be36f95a6", - "type": "api-call-service", - "z": "5af82cd4c44df066", - "name": "Turn on lights kitchen", - "wires": [ - [ - "86f4b8eb539e8b4f" - ] - ], - "server": "657c7463.48e1e4", - "version": 7, - "debugenabled": false, - "action": "light.turn_on", - "floorId": [], - "areaId": [ - "58b6232129db4aa396355dcff5edc036" - ], - "deviceId": [], - "entityId": [], - "labelId": [], - "data": "{{{payload}}}", - "dataType": "json", - "mergeContext": "", - "mustacheAltTags": false, - "outputProperties": [], - "queue": "none", - "blockInputOverrides": false, - "domain": "light", - "service": "turn_on", - "x": 1580, - "y": 200 - }, - { - "id": "7c14d1f3a819183d", - "type": "change", - "z": "5af82cd4c44df066", - "name": "Brightness increase (smooth)", - "wires": [ - [ - "6289202be36f95a6" - ] - ], - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_step\":15,\"transition\":0.8}", - "tot": "json" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1170, - "y": 340 - }, - { - "id": "044378dc99eb8bf0", - "type": "change", - "z": "5af82cd4c44df066", - "name": "Brightness decrease (smooth)", - "wires": [ - [ - "6289202be36f95a6" - ] - ], - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_step\":-15,\"transition\":0.8}", - "tot": "json" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1160, - "y": 380 - }, - { - "id": "102d2d6180407101", - "type": "change", - "z": "5af82cd4c44df066", - "name": "Brightness to 0 (turn off)", - "wires": [ - [ - "6289202be36f95a6" - ] - ], - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness\":0}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1170, - "y": 160 - }, - { - "id": "39aba0a7d9f18c40", - "type": "change", - "z": "5af82cd4c44df066", - "name": "Brightness to 20%", - "wires": [ - [ - "6289202be36f95a6" - ] - ], - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_pct\":20}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1190, - "y": 120 - }, - { - "id": "4584b1c0133c143c", - "type": "change", - "z": "5af82cd4c44df066", - "name": "Brightness to 100%", - "wires": [ - [ - "6289202be36f95a6" - ] - ], - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_pct\":100}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1190, - "y": 40 - }, - { - "id": "72521808adb6aa7f", - "type": "comment", - "z": "5af82cd4c44df066", - "name": "Dimmer functionality - HUE", - "wires": [], - "info": "", - "x": 450, - "y": 300 - }, - { - "id": "3ffbb3073f04796e", - "type": "switch", - "z": "5af82cd4c44df066", - "name": "Brightness check - Down press/hold", - "wires": [ - [ - "044378dc99eb8bf0" - ], - [ - "044378dc99eb8bf0" - ] - ], - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "down_press", - "vt": "str" - }, - { - "t": "eq", - "v": "down_hold", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 480, - "y": 380 - }, - { - "id": "bf062f43abe3400c", - "type": "switch", - "z": "5af82cd4c44df066", - "name": "On hold", - "wires": [ - [ - "e6992acd908b4480" - ], - [ - "07208f4cb940887d" - ] - ], - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "on_hold", - "vt": "str" - }, - { - "t": "eq", - "v": "off_hold", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 400, - "y": 240 - }, - { - "id": "e6992acd908b4480", - "type": "change", - "z": "5af82cd4c44df066", - "name": "Brightness to 100% and energize profile", - "wires": [ - [ - "6289202be36f95a6" - ] - ], - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness\":255,\"profile\":\"energize\"}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1120, - "y": 240 - }, - { - "id": "0f7bdb44f2ca1db8", - "type": "comment", - "z": "5af82cd4c44df066", - "name": "Reset to energize mode (default color hue)", - "wires": [], - "info": "", - "x": 500, - "y": 200 - }, - { - "id": "23aa3bbdf2a47c04", - "type": "change", - "z": "5af82cd4c44df066", - "name": "Brightness to 0 (turn off)", - "wires": [ - [ - "6289202be36f95a6" - ] - ], - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness\":0}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1170, - "y": 500 - }, - { - "id": "893c90eae1394985", - "type": "change", - "z": "5af82cd4c44df066", - "name": "Brightness to 100%", - "wires": [ - [ - "6289202be36f95a6" - ] - ], - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_pct\":100}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1190, - "y": 600 - }, - { - "id": "39f60aff80425ab8", - "type": "comment", - "z": "5af82cd4c44df066", - "name": "Kitchen motion sensor", - "wires": [], - "info": "", - "x": 180, - "y": 460 - }, - { - "id": "07208f4cb940887d", - "type": "change", - "z": "5af82cd4c44df066", - "name": "Brightness to 20% and energize profile", - "wires": [ - [ - "6289202be36f95a6" - ] - ], - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_pct\":20,\"profile\":\"relax\"}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1130, - "y": 280 - }, - { - "id": "72fce694d3455880", - "type": "change", - "z": "5af82cd4c44df066", - "name": "Brightness to 65%", - "wires": [ - [ - "6289202be36f95a6" - ] - ], - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_pct\":65}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1190, - "y": 80 - }, - { - "id": "86f4b8eb539e8b4f", - "type": "debug", - "z": "5af82cd4c44df066", - "name": "Kitchen Debug", - "wires": [], - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "payload", - "targetType": "msg", - "statusVal": "", - "statusType": "auto", - "x": 1580, - "y": 300 - }, - { - "id": "38192b587d9b9f39", - "type": "server-state-changed", - "z": "5af82cd4c44df066", - "name": "Kitchen motion sensor", - "wires": [ - [ - "b5a33742cf8ae14a", - "eb433762a15ff684" - ], - [ - "893c90eae1394985", - "eb433762a15ff684", - "b5a33742cf8ae14a" - ] - ], - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 2, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "binary_sensor.kitchen_motion_sensor_occupancy" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "off", - "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": "string", - "valueType": "entityState" - }, - { - "property": "data", - "propertyType": "msg", - "value": "", - "valueType": "eventData" - }, - { - "property": "topic", - "propertyType": "msg", - "value": "", - "valueType": "triggerId" - } - ], - "x": 180, - "y": 500 - }, - { - "id": "679f37f58704d88f", - "type": "change", - "z": "5af82cd4c44df066", - "name": "Flash at brightness 100%", - "wires": [ - [ - "6289202be36f95a6" - ] - ], - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "{\"brightness_pct\":100,\"flash\":\"short\"}", - "tot": "str" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1170, - "y": 460 - }, - { - "id": "fb51416832400a90", - "type": "server-state-changed", - "z": "5af82cd4c44df066", - "name": "", - "wires": [ - [ - "a83bddfc2380a7fc" - ] - ], - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 1, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "input_button.test_button_kitchen" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "", - "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": 310, - "y": 860 - }, - { - "id": "a83bddfc2380a7fc", - "type": "debug", - "z": "5af82cd4c44df066", - "name": "debug 5", - "wires": [], - "active": true, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 740, - "y": 860 - }, - { - "id": "d8bfcf399f7df488", - "type": "server-state-changed", - "z": "5af82cd4c44df066", - "name": "", - "wires": [ - [ - "a83bddfc2380a7fc" - ] - ], - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 1, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "input_select.kitchen_scene_selector" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "", - "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": 280, - "y": 920 - }, - { - "id": "0f50cf7e0d776d55", - "type": "server-state-changed", - "z": "5af82cd4c44df066", - "name": "", - "wires": [ - [ - "a83bddfc2380a7fc" - ] - ], - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 1, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "input_select.kitchen_scene_shifter" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "", - "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": 280, - "y": 980 - }, - { - "id": "ee1d6a217dd0e238", - "type": "server-state-changed", - "z": "5af82cd4c44df066", - "name": "", - "wires": [ - [ - "a83bddfc2380a7fc" - ] - ], - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 1, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "input_boolean.kitchen_lights_on" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "", - "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": 280, - "y": 1040 - }, - { - "id": "bbae72e59241d2c0", - "type": "server-state-changed", - "z": "5af82cd4c44df066", - "name": "", - "wires": [ - [ - "a83bddfc2380a7fc" - ] - ], - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 1, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "input_boolean.kitchen_occupied" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "", - "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": 280, - "y": 1160 - }, - { - "id": "c223cdc7301b7103", - "type": "server-state-changed", - "z": "5af82cd4c44df066", - "name": "", - "wires": [ - [ - "a83bddfc2380a7fc" - ] - ], - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 1, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "light.kitchen_2" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "", - "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": 280, - "y": 1100 - }, - { - "id": "28725aa2f0bc83ef", - "type": "subflow:52430f5e9f9ee267", - "z": "5af82cd4c44df066", - "name": "", - "wires": [ - [ - "4584b1c0133c143c" - ], - [ - "4584b1c0133c143c" - ], - [ - "4584b1c0133c143c" - ], - [ - "72fce694d3455880" - ], - [ - "72fce694d3455880" - ], - [ - "39aba0a7d9f18c40" - ] - ], - "x": 730, - "y": 60 - }, - { - "id": "b5a33742cf8ae14a", - "type": "trigger", - "z": "5af82cd4c44df066", - "name": "Trigger 2:30min for flash", - "wires": [ - [ - "679f37f58704d88f" - ] - ], - "op1": "", - "op2": "offf", - "op1type": "nul", - "op2type": "str", - "duration": "150", - "extend": false, - "overrideDelay": false, - "units": "s", - "reset": "on", - "bytopic": "all", - "topic": "topic", - "outputs": 1, - "x": 730, - "y": 460 - }, - { - "id": "eb433762a15ff684", - "type": "trigger", - "z": "5af82cd4c44df066", - "name": "Trigger 3:00 min for off", - "wires": [ - [ - "23aa3bbdf2a47c04" - ] - ], - "op1": "", - "op2": "offf", - "op1type": "nul", - "op2type": "str", - "duration": "180", - "extend": false, - "overrideDelay": false, - "units": "s", - "reset": "on", - "bytopic": "all", - "topic": "topic", - "outputs": 1, - "x": 720, - "y": 500 - }, - { - "id": "ktchn_timebased_01", - "type": "server-state-changed", - "z": "5af82cd4c44df066", - "name": "Kitchen time-based turn on", - "wires": [ - [ - "28725aa2f0bc83ef", - "b5a33742cf8ae14a", - "eb433762a15ff684" - ] - ], - "server": "657c7463.48e1e4", - "version": 6, - "outputs": 1, - "exposeAsEntityConfig": "", - "entities": { - "entity": [ - "input_button.kitchen_time_based_turn_on" - ], - "substring": [], - "regex": [] - }, - "outputInitially": false, - "stateType": "str", - "ifState": "", - "ifStateType": "str", - "ifStateOperator": "is", - "outputOnlyOnStateChange": true, - "for": "", - "forType": "num", - "forUnits": "milliseconds", - "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": 190, - "y": 160 - }, { "id": "f3d66e8924f18806", "type": "server-state-changed", @@ -22918,5 +21766,1223 @@ "output_location_type": "none", "x": 660, "y": 2280 + }, + { + "type": "tab", + "label": "Kitchen", + "id": "5af82cd4c44df066" + }, + { + "id": "970f66c027cf1bda", + "type": "server-state-changed", + "z": "5af82cd4c44df066", + "name": "Kitchen smart switch", + "wires": [ + [ + "d5ae93765e66efa4", + "099d186859d09206", + "3ffbb3073f04796e", + "bf062f43abe3400c", + "86f4b8eb539e8b4f" + ] + ], + "server": "657c7463.48e1e4", + "version": 6, + "outputs": 1, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "sensor.kitchen_switch_action" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "", + "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": 170, + "y": 100 + }, + { + "id": "d5ae93765e66efa4", + "type": "switch", + "z": "5af82cd4c44df066", + "name": "On/Off check", + "wires": [ + [ + "28725aa2f0bc83ef" + ], + [ + "102d2d6180407101" + ] + ], + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "on_press_release", + "vt": "str" + }, + { + "t": "eq", + "v": "off_press_release", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 410, + "y": 100 + }, + { + "id": "deae916e70685ff1", + "type": "comment", + "z": "5af82cd4c44df066", + "name": "Kitchen Lights on/off switch", + "wires": [], + "info": "", + "x": 190, + "y": 60 + }, + { + "id": "099d186859d09206", + "type": "switch", + "z": "5af82cd4c44df066", + "name": "Brightness check - Up press/hold", + "wires": [ + [ + "7c14d1f3a819183d" + ], + [ + "7c14d1f3a819183d" + ] + ], + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "up_press", + "vt": "str" + }, + { + "t": "eq", + "v": "up_hold", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 480, + "y": 340 + }, + { + "id": "6289202be36f95a6", + "type": "api-call-service", + "z": "5af82cd4c44df066", + "name": "Turn on lights kitchen", + "wires": [ + [ + "86f4b8eb539e8b4f" + ] + ], + "server": "657c7463.48e1e4", + "version": 7, + "debugenabled": false, + "action": "light.turn_on", + "floorId": [], + "areaId": [ + "58b6232129db4aa396355dcff5edc036" + ], + "deviceId": [], + "entityId": [], + "labelId": [], + "data": "{{{payload}}}", + "dataType": "json", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": false, + "domain": "light", + "service": "turn_on", + "x": 1580, + "y": 200 + }, + { + "id": "7c14d1f3a819183d", + "type": "change", + "z": "5af82cd4c44df066", + "name": "Brightness increase (smooth)", + "wires": [ + [ + "6289202be36f95a6" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_step\":15,\"transition\":0.8}", + "tot": "json" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1170, + "y": 340 + }, + { + "id": "044378dc99eb8bf0", + "type": "change", + "z": "5af82cd4c44df066", + "name": "Brightness decrease (smooth)", + "wires": [ + [ + "6289202be36f95a6" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_step\":-15,\"transition\":0.8}", + "tot": "json" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1160, + "y": 380 + }, + { + "id": "102d2d6180407101", + "type": "change", + "z": "5af82cd4c44df066", + "name": "Brightness to 0 (turn off)", + "wires": [ + [ + "6289202be36f95a6" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness\":0}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1170, + "y": 160 + }, + { + "id": "39aba0a7d9f18c40", + "type": "change", + "z": "5af82cd4c44df066", + "name": "Brightness to 20%", + "wires": [ + [ + "6289202be36f95a6" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_pct\":20}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1190, + "y": 120 + }, + { + "id": "4584b1c0133c143c", + "type": "change", + "z": "5af82cd4c44df066", + "name": "Brightness to 100%", + "wires": [ + [ + "6289202be36f95a6" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_pct\":100}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1190, + "y": 40 + }, + { + "id": "72521808adb6aa7f", + "type": "comment", + "z": "5af82cd4c44df066", + "name": "Dimmer functionality - HUE", + "wires": [], + "info": "", + "x": 450, + "y": 300 + }, + { + "id": "3ffbb3073f04796e", + "type": "switch", + "z": "5af82cd4c44df066", + "name": "Brightness check - Down press/hold", + "wires": [ + [ + "044378dc99eb8bf0" + ], + [ + "044378dc99eb8bf0" + ] + ], + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "down_press", + "vt": "str" + }, + { + "t": "eq", + "v": "down_hold", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 480, + "y": 380 + }, + { + "id": "bf062f43abe3400c", + "type": "switch", + "z": "5af82cd4c44df066", + "name": "On hold", + "wires": [ + [ + "e6992acd908b4480" + ], + [ + "07208f4cb940887d" + ] + ], + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "on_hold", + "vt": "str" + }, + { + "t": "eq", + "v": "off_hold", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 400, + "y": 240 + }, + { + "id": "e6992acd908b4480", + "type": "change", + "z": "5af82cd4c44df066", + "name": "Brightness to 100% and energize profile", + "wires": [ + [ + "6289202be36f95a6" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness\":255,\"profile\":\"energize\"}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1120, + "y": 240 + }, + { + "id": "0f7bdb44f2ca1db8", + "type": "comment", + "z": "5af82cd4c44df066", + "name": "Reset to energize mode (default color hue)", + "wires": [], + "info": "", + "x": 500, + "y": 200 + }, + { + "id": "23aa3bbdf2a47c04", + "type": "change", + "z": "5af82cd4c44df066", + "name": "Brightness to 0 (turn off)", + "wires": [ + [ + "6289202be36f95a6" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness\":0}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1170, + "y": 500 + }, + { + "id": "893c90eae1394985", + "type": "change", + "z": "5af82cd4c44df066", + "name": "Brightness to 100%", + "wires": [ + [ + "6289202be36f95a6" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_pct\":100}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1190, + "y": 600 + }, + { + "id": "39f60aff80425ab8", + "type": "comment", + "z": "5af82cd4c44df066", + "name": "Kitchen motion sensor", + "wires": [], + "info": "", + "x": 180, + "y": 460 + }, + { + "id": "07208f4cb940887d", + "type": "change", + "z": "5af82cd4c44df066", + "name": "Brightness to 20% and energize profile", + "wires": [ + [ + "6289202be36f95a6" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_pct\":20,\"profile\":\"relax\"}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1130, + "y": 280 + }, + { + "id": "72fce694d3455880", + "type": "change", + "z": "5af82cd4c44df066", + "name": "Brightness to 65%", + "wires": [ + [ + "6289202be36f95a6" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_pct\":65}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1190, + "y": 80 + }, + { + "id": "86f4b8eb539e8b4f", + "type": "debug", + "z": "5af82cd4c44df066", + "name": "Kitchen Debug", + "wires": [], + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 1580, + "y": 300 + }, + { + "id": "38192b587d9b9f39", + "type": "server-state-changed", + "z": "5af82cd4c44df066", + "name": "Kitchen motion sensor", + "wires": [ + [ + "b5a33742cf8ae14a", + "eb433762a15ff684" + ], + [ + "893c90eae1394985", + "eb433762a15ff684", + "b5a33742cf8ae14a" + ] + ], + "server": "657c7463.48e1e4", + "version": 6, + "outputs": 2, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "binary_sensor.kitchen_motion_sensor_occupancy" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "off", + "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": "string", + "valueType": "entityState" + }, + { + "property": "data", + "propertyType": "msg", + "value": "", + "valueType": "eventData" + }, + { + "property": "topic", + "propertyType": "msg", + "value": "", + "valueType": "triggerId" + } + ], + "x": 180, + "y": 500 + }, + { + "id": "679f37f58704d88f", + "type": "change", + "z": "5af82cd4c44df066", + "name": "Flash at brightness 100%", + "wires": [ + [ + "6289202be36f95a6" + ] + ], + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "{\"brightness_pct\":100,\"flash\":\"short\"}", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1170, + "y": 460 + }, + { + "id": "fb51416832400a90", + "type": "server-state-changed", + "z": "5af82cd4c44df066", + "name": "", + "wires": [ + [ + "a83bddfc2380a7fc" + ] + ], + "server": "657c7463.48e1e4", + "version": 6, + "outputs": 1, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "input_button.test_button_kitchen" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "", + "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": 310, + "y": 860 + }, + { + "id": "a83bddfc2380a7fc", + "type": "debug", + "z": "5af82cd4c44df066", + "name": "debug 5", + "wires": [], + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 740, + "y": 860 + }, + { + "id": "d8bfcf399f7df488", + "type": "server-state-changed", + "z": "5af82cd4c44df066", + "name": "", + "wires": [ + [ + "a83bddfc2380a7fc" + ] + ], + "server": "657c7463.48e1e4", + "version": 6, + "outputs": 1, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "input_select.kitchen_scene_selector" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "", + "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": 280, + "y": 920 + }, + { + "id": "0f50cf7e0d776d55", + "type": "server-state-changed", + "z": "5af82cd4c44df066", + "name": "", + "wires": [ + [ + "a83bddfc2380a7fc" + ] + ], + "server": "657c7463.48e1e4", + "version": 6, + "outputs": 1, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "input_select.kitchen_scene_shifter" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "", + "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": 280, + "y": 980 + }, + { + "id": "ee1d6a217dd0e238", + "type": "server-state-changed", + "z": "5af82cd4c44df066", + "name": "", + "wires": [ + [ + "a83bddfc2380a7fc" + ] + ], + "server": "657c7463.48e1e4", + "version": 6, + "outputs": 1, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "input_boolean.kitchen_lights_on" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "", + "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": 280, + "y": 1040 + }, + { + "id": "bbae72e59241d2c0", + "type": "server-state-changed", + "z": "5af82cd4c44df066", + "name": "", + "wires": [ + [ + "a83bddfc2380a7fc" + ] + ], + "server": "657c7463.48e1e4", + "version": 6, + "outputs": 1, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "input_boolean.kitchen_occupied" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "", + "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": 280, + "y": 1160 + }, + { + "id": "c223cdc7301b7103", + "type": "server-state-changed", + "z": "5af82cd4c44df066", + "name": "", + "wires": [ + [ + "a83bddfc2380a7fc" + ] + ], + "server": "657c7463.48e1e4", + "version": 6, + "outputs": 1, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "light.kitchen_2" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "", + "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": 280, + "y": 1100 + }, + { + "id": "28725aa2f0bc83ef", + "type": "subflow:52430f5e9f9ee267", + "z": "5af82cd4c44df066", + "name": "", + "wires": [ + [ + "4584b1c0133c143c" + ], + [ + "4584b1c0133c143c" + ], + [ + "4584b1c0133c143c" + ], + [ + "72fce694d3455880" + ], + [ + "72fce694d3455880" + ], + [ + "39aba0a7d9f18c40" + ] + ], + "x": 730, + "y": 60 + }, + { + "id": "b5a33742cf8ae14a", + "type": "trigger", + "z": "5af82cd4c44df066", + "name": "Trigger 2:30min for flash", + "wires": [ + [ + "679f37f58704d88f" + ] + ], + "op1": "", + "op2": "offf", + "op1type": "nul", + "op2type": "str", + "duration": "150", + "extend": false, + "overrideDelay": false, + "units": "s", + "reset": "on", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 730, + "y": 460 + }, + { + "id": "eb433762a15ff684", + "type": "trigger", + "z": "5af82cd4c44df066", + "name": "Trigger 3:00 min for off", + "wires": [ + [ + "23aa3bbdf2a47c04" + ] + ], + "op1": "", + "op2": "offf", + "op1type": "nul", + "op2type": "str", + "duration": "180", + "extend": false, + "overrideDelay": false, + "units": "s", + "reset": "on", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 720, + "y": 500 + }, + { + "id": "ktchn_timebased_01", + "type": "server-state-changed", + "z": "5af82cd4c44df066", + "name": "Kitchen time-based turn on", + "wires": [ + [ + "28725aa2f0bc83ef", + "b5a33742cf8ae14a", + "eb433762a15ff684" + ] + ], + "server": "657c7463.48e1e4", + "version": 6, + "outputs": 1, + "exposeAsEntityConfig": "", + "entities": { + "entity": [ + "input_button.kitchen_time_based_turn_on" + ], + "substring": [], + "regex": [] + }, + "outputInitially": false, + "stateType": "str", + "ifState": "", + "ifStateType": "str", + "ifStateOperator": "is", + "outputOnlyOnStateChange": true, + "for": "", + "forType": "num", + "forUnits": "milliseconds", + "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": 190, + "y": 160 + }, + { + "id": "p2catch_kit", + "type": "catch", + "z": "5af82cd4c44df066", + "name": "Catch all errors", + "wires": [ + [ + "p2fmt_kit" + ] + ], + "scope": null, + "uncaught": false, + "x": 160, + "y": 1360 + }, + { + "id": "p2fmt_kit", + "type": "function", + "z": "5af82cd4c44df066", + "name": "Format error", + "wires": [ + [ + "p2ntfy_kit" + ] + ], + "func": "const err = (msg.error && msg.error.message) ? msg.error.message : String(msg.payload || 'Unknown error');\nconst src = (msg.error && msg.error.source) ? (msg.error.source.name || msg.error.source.id || '') : '';\nmsg.payload = JSON.stringify({\n title: 'Node-RED Error: Kitchen',\n message: err + (src ? '\\n\\nNode: ' + src : '')\n});\nreturn msg;", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "timeout": "", + "x": 400, + "y": 1360 + }, + { + "id": "p2ntfy_kit", + "type": "api-call-service", + "z": "5af82cd4c44df066", + "name": "Notify error", + "wires": [ + [] + ], + "server": "657c7463.48e1e4", + "version": 7, + "debugenabled": false, + "action": "notify.gotify_ha", + "floorId": [], + "areaId": [], + "deviceId": [], + "entityId": [], + "labelId": [], + "data": "{{{payload}}}", + "dataType": "json", + "mergeContext": "", + "mustacheAltTags": false, + "outputProperties": [], + "queue": "none", + "blockInputOverrides": false, + "domain": "notify", + "service": "gotify_ha", + "output_location": "", + "output_location_type": "none", + "x": 660, + "y": 1360 } ] \ No newline at end of file