diff --git a/flows.json b/flows.json index 893d04c..8913e40 100644 --- a/flows.json +++ b/flows.json @@ -13832,7 +13832,7 @@ "type": "function", "z": "ce9c810396e540b6", "name": "Processing", - "func": "// Set constants\nconst states = global.get('homeassistant.homeAssistant.states')\nconst occupied = states[\"binary_sensor.basement_occupied\"].state\nconst quiet = states[\"input_boolean.studio_quiet\"].state\nconst stateTinaDesk = states[\"light.tina_desk_lights\"].state\nconst stateLivingRoom = states[\"light.living_room_lights\"].state\nconst stateDiningRoom = states[\"light.dining_room_lamp\"].state\nconst stateStairwell = states[\"light.stairwell_led_strip\"].state\nconst stateBasement = states[\"light.basement_studio_lights\"].state\nconst adaptLivingRoom = states[\"switch.adaptive_lighting_living_room\"].state\nconst adaptDiningRoom = states[\"switch.adaptive_lighting_dining_room_lamp\"].state\nconst adaptBasement = states[\"switch.adaptive_lighting_basement_studio\"].state\nconst nightLivingRoom = states[\"switch.adaptive_lighting_sleep_mode_living_room\"].state\nconst nightDiningRoom = states[\"switch.adaptive_lighting_sleep_mode_dining_room_lamp\"].state\nconst nightBasement = states[\"switch.adaptive_lighting_sleep_mode_basement_studio\"].state\nconst currentSceneBasement = states[\"input_text.basement_studio_selected_scene\"].state\nconst currentSceneLivingRoom = states[\"input_text.living_room_selected_scene\"].state\nconst currentSceneTinaDesk = states[\"input_text.tina_desk_selected_scene\"].state\nconst currentSceneDiningRoom = states[\"input_text.dining_room_lamp_selected_scene\"].state\nconst effectBasement = msg.payload.event.basement\nconst effectFirstFloor = msg.payload.event.first_floor\nconst effectColor = msg.payload.event.color\nconst effectDivide = msg.payload.event.divide\nconst duration = msg.payload.event.duration\nconst delay = duration * 1000\nconst adaptiveSwitchFirstFloor = flow.get(\"adaptiveFirstFloor\", \"diskCon\")\nconst adaptiveSwitchBasement = flow.get(\"adaptiveBasement\", \"diskCon\")\nconst lightsTinaDesk = flow.get('lightsTinaDesk', 'diskCon')\nconst lightsBasement = flow.get('lightsBasement', 'diskCon')\nconst lightsLivingRoom = flow.get('lightsLivingRoom', 'diskCon')\nconst lightsDiningRoom = flow.get('lightsDiningRoom', 'diskCon')\nconst alertFirstFloor = flow.get('alertFirstFloor')\nconst alertBasement = flow.get('alertBasement')\n\n// Set flow contexts to be used later in the reset node\nflow.set(\"currentSceneBasement\", currentSceneBasement)\nflow.set(\"currentSceneLivingRoom\", currentSceneLivingRoom)\nflow.set(\"currentSceneTinaDesk\", currentSceneTinaDesk)\nflow.set('currentSceneDiningRoom', currentSceneDiningRoom)\nflow.set(\"adaptLivingRoom\", adaptLivingRoom)\nflow.set(\"adaptBasement\", adaptBasement)\nflow.set(\"nightLivingRoom\", nightLivingRoom)\nflow.set(\"nightBasement\", nightBasement)\nflow.set('nightDiningRoom', nightDiningRoom)\nflow.set(\"stateTinaDesk\", stateTinaDesk)\nflow.set(\"stateLivingRoom\", stateLivingRoom)\nflow.set(\"stateDiningRoom\", stateDiningRoom)\nflow.set(\"stateStairwell\", stateStairwell)\nflow.set(\"stateBasement\", stateBasement)\n\n// Define empty arrays for basement LED strip zones\nlet basement1 = []\nlet basement2 = []\nlet basementFull = []\n// Define empty arrays for living room LED strip zones\nlet livingRoom1 = []\nlet livingRoom2 = []\nlet livingRoomFull = []\n// Color names are set by default, however certain effects can override them below\nlet colorName1 = effectColor\nlet colorName2 = \"white\"\n// Define empty object for LIFX effect settings\nlet lifxData = {}\nlet effectLifx = msg.payload.event.lifx\n\n// Setup the proper zones to use for the effect\nif (effectDivide === 'half') {\n basement1 = flow.get(\"halfBasement1\", \"diskCon\")\n basement2 = flow.get(\"halfBasement2\", \"diskCon\")\n livingRoom1 = flow.get(\"halfLivingRoom1\", \"diskCon\")\n livingRoom2 = flow.get(\"halfLivingRoom2\", \"diskCon\")\n} else if (effectDivide === 'quarter') {\n basement1 = flow.get(\"effectSegBasement1\", \"diskCon\")\n basement2 = flow.get(\"effectSegBasement2\", \"diskCon\")\n livingRoom1 = flow.get(\"effectSegLivingRoom1\", \"diskCon\")\n livingRoom2 = flow.get(\"effectSegLivingRoom2\", \"diskCon\")\n} else if (effectDivide === 'full') {\n basementFull = flow.get(\"basementFull\", \"diskCon\")\n livingRoomFull = flow.get(\"livingRoomFull\", \"diskCon\")\n}\n\nif (effectFirstFloor === true) {\n flow.set('alertFirstFloor', true)\n}\n\nif (effectBasement === true) {\n flow.set('alertBasement', true)\n}\n\n// Set/change colors if necessary\nif (effectColor === 'police') {\n colorName1 = 'red'\n colorName2 = 'blue'\n}\n\n// Define parameters for different LIFX effects\nif (effectLifx === 'move') {\n lifxData = {\n \"speed\": 0.5,\n \"direction\": \"right\",\n \"power_on\": false\n }\n} else if (effectLifx === 'ping') {\n effectLifx = 'pulse'\n colorName2 = colorName1\n lifxData = {\n \"power_on\": false,\n \"mode\": \"ping\",\n \"period\": 1,\n \"cycles\": duration,\n \"color_name\": \"white\",\n \"brightness\": 255\n }\n} else if (effectLifx === 'blink') {\n effectLifx = 'pulse'\n colorName2 = colorName1\n lifxData = {\n \"power_on\": false,\n \"mode\": \"blink\",\n \"period\": 0.5,\n \"cycles\": duration * 2,\n \"color_name\": \"white\",\n \"brightness\": 255\n }\n}\n\n// Define messages\nlet sendBasementStripFX = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"effect_\" + effectLifx,\n \"target\": {\n \"entity_id\": [\"light.basement_led_strip_1\"]\n },\n \"data\": lifxData\n }\n}\n\nlet sendBasementStrip1 = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"set_state\",\n \"target\": {\n \"entity_id\": [\"light.basement_led_strip_1\"]\n },\n \"data\": {\n \"zones\": basement1,\n \"color_name\": colorName1,\n \"brightness\": 255\n }\n }\n}\n\nlet sendBasementStrip2 = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"set_state\",\n \"target\": {\n \"entity_id\": [\"light.basement_led_strip_1\"]\n },\n \"data\": {\n \"zones\": basement2,\n \"color_name\": colorName2,\n \"brightness\": 255,\n \"power\": true\n }\n }\n}\n\nlet sendBasementLights = {\n \"payload\": {\n \"domain\": \"light\",\n \"service\": \"turn_on\",\n \"target\": {\n \"entity_id\": [\n \"light.basement_tall_lamp\",\n \"light.basement_short_lamp\",\n \"light.basement_stairwell\"\n ]\n },\n \"data\": {\n \"color_name\": colorName1,\n \"brightness\": 255\n }\n }\n}\n\nlet sendLivingRoomStripFX = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"effect_\" + effectLifx,\n \"target\": {\n \"entity_id\": [\"light.living_room_led_strip\"]\n },\n \"data\": lifxData\n }\n}\n\nlet sendLivingRoomStrip1 = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"set_state\",\n \"target\": {\n \"entity_id\": [\"light.living_room_led_strip\"]\n },\n \"data\": {\n \"zones\": livingRoom1,\n \"color_name\": colorName1,\n \"brightness\": 255\n }\n }\n}\n\nlet sendLivingRoomStrip2 = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"set_state\",\n \"target\": {\n \"entity_id\": [\"light.living_room_led_strip\"]\n },\n \"data\": {\n \"zones\": livingRoom2,\n \"color_name\": colorName2,\n \"brightness\": 255,\n \"power\": true\n }\n }\n}\n\nlet sendLivingRoomLights = {\n \"payload\": {\n \"domain\": \"light\",\n \"service\": \"turn_on\",\n \"target\": {\n \"entity_id\": [\n \"light.living_room_color_1\",\n \"light.living_room_color_2\",\n \"light.living_room_color_3\",\n \"light.stairwell_led_strip\"\n ]\n },\n \"data\": {\n \"color_name\": colorName1,\n \"brightness\": 255\n }\n }\n}\n\nlet sendTinaDeskLights = {\n \"payload\": {\n \"domain\": \"light\",\n \"service\": \"turn_on\",\n \"target\": {\n \"entity_id\": [\"light.tina_desk_lights\"]\n },\n \"data\": {\n \"color_name\": colorName1,\n \"brightness\": 255\n }\n }\n}\n\nlet sendDiningRoomLamp = {\n \"payload\": {\n \"domain\": \"light\",\n \"service\": \"turn_off\",\n \"target\": {\n \"entity_id\": [\"light.dining_room_lamp\"]\n },\n \"data\": {}\n }\n}\n\nlet sendAdaptiveFirstFloor = {\n \"payload\": {\n \"domain\": \"switch\",\n \"service\": \"turn_off\",\n \"target\": {\n \"entity_id\": adaptiveSwitchFirstFloor\n },\n \"data\": {}\n }\n}\n\nlet sendAdaptiveBasement = {\n \"payload\": {\n \"domain\": \"switch\",\n \"service\": \"turn_off\",\n \"target\": {\n \"entity_id\": adaptiveSwitchBasement\n },\n \"data\": {}\n }\n}\n\nlet backupLivingRoom = {\n \"payload\": {\n \"domain\": \"scene\",\n \"service\": \"create\",\n \"data\": {\n \"scene_id\": \"living_room_alert_restore\",\n \"snapshot_entities\": lightsLivingRoom\n }\n }\n}\n\nlet backupTinaDesk = {\n \"payload\": {\n \"domain\": \"scene\",\n \"service\": \"create\",\n \"data\": {\n \"scene_id\": \"tina_desk_alert_restore\",\n \"snapshot_entities\": lightsTinaDesk\n }\n }\n}\n\nlet backupBasement = {\n \"payload\": {\n \"domain\": \"scene\",\n \"service\": \"create\",\n \"data\": {\n \"scene_id\": \"basement_alert_restore\",\n \"snapshot_entities\": lightsBasement\n }\n }\n}\n\nlet sendReset = {\n \"delay\": delay\n}\n\n// Send backup messages\nif (stateLivingRoom === 'on' && alertFirstFloor === false) {\n node.send([backupLivingRoom,null,null,null,null,null])\n}\n\nif (stateTinaDesk === 'on' && alertFirstFloor === false) {\n node.send([backupTinaDesk,null,null,null,null,null])\n}\n\nif (stateBasement === 'on' && alertBasement === false) {\n node.send([backupBasement,null,null,null,null,null])\n}\n\n// Send effect messages\nif (effectBasement === true) {\n node.send([null,null,null,null,[sendAdaptiveBasement,sendBasementLights,sendBasementStripFX,sendBasementStrip1,sendBasementStrip2],null])\n}\n\nif (effectFirstFloor === true) {\n node.send([null,[sendAdaptiveFirstFloor,sendLivingRoomLights,sendLivingRoomStripFX,sendLivingRoomStrip1,sendLivingRoomStrip2],sendTinaDeskLights,sendDiningRoomLamp,null,null])\n}\n\n// Send the reset message to start the timer\nnode.send([null,null,null,null,null,sendReset])\n\nnode.status({fill:'green',shape:'dot',text:'Alert Sent'})", + "func": "// Set constants\nconst states = global.get('homeassistant.homeAssistant.states')\nconst occupied = states[\"binary_sensor.basement_occupied\"].state\nconst quiet = states[\"input_boolean.studio_quiet\"].state\nconst stateTinaDesk = states[\"light.tina_desk_lights\"].state\nconst stateLivingRoom = states[\"light.living_room_lights\"].state\nconst stateDiningRoom = states[\"light.dining_room_lamp\"].state\nconst stateStairwell = states[\"light.stairwell_led_strip\"].state\nconst stateBasement = states[\"light.basement_studio_lights\"].state\nconst adaptLivingRoom = states[\"switch.adaptive_lighting_living_room\"].state\nconst adaptDiningRoom = states[\"switch.adaptive_lighting_dining_room_lamp\"].state\nconst adaptBasement = states[\"switch.adaptive_lighting_basement_studio\"].state\nconst nightLivingRoom = states[\"switch.adaptive_lighting_sleep_mode_living_room\"].state\nconst nightDiningRoom = states[\"switch.adaptive_lighting_sleep_mode_dining_room_lamp\"].state\nconst nightBasement = states[\"switch.adaptive_lighting_sleep_mode_basement_studio\"].state\nconst currentSceneBasement = states[\"input_text.basement_studio_selected_scene\"].state\nconst currentSceneLivingRoom = states[\"input_text.living_room_selected_scene\"].state\nconst currentSceneTinaDesk = states[\"input_text.tina_desk_selected_scene\"].state\nconst currentSceneDiningRoom = states[\"input_text.dining_room_lamp_selected_scene\"].state\nconst effectBasement = msg.payload.event.basement\nconst effectFirstFloor = msg.payload.event.first_floor\nconst effectColor = msg.payload.event.color\nconst effectDivide = msg.payload.event.divide\nconst duration = msg.payload.event.duration\nconst delay = duration * 1000\nconst adaptiveSwitchFirstFloor = flow.get(\"adaptiveFirstFloor\", \"diskCon\")\nconst adaptiveSwitchBasement = flow.get(\"adaptiveBasement\", \"diskCon\")\nconst lightsTinaDesk = flow.get('lightsTinaDesk', 'diskCon')\nconst lightsBasement = flow.get('lightsBasement', 'diskCon')\nconst lightsLivingRoom = flow.get('lightsLivingRoom', 'diskCon')\nconst lightsDiningRoom = flow.get('lightsDiningRoom', 'diskCon')\nconst alertFirstFloor = flow.get('alertFirstFloor')\nconst alertBasement = flow.get('alertBasement')\n\n// Set flow contexts to be used later in the reset node\nflow.set(\"currentSceneBasement\", currentSceneBasement)\nflow.set(\"currentSceneLivingRoom\", currentSceneLivingRoom)\nflow.set(\"currentSceneTinaDesk\", currentSceneTinaDesk)\nflow.set('currentSceneDiningRoom', currentSceneDiningRoom)\nflow.set(\"adaptLivingRoom\", adaptLivingRoom)\nflow.set(\"adaptBasement\", adaptBasement)\nflow.set(\"nightLivingRoom\", nightLivingRoom)\nflow.set(\"nightBasement\", nightBasement)\nflow.set('nightDiningRoom', nightDiningRoom)\nflow.set(\"stateTinaDesk\", stateTinaDesk)\nflow.set(\"stateLivingRoom\", stateLivingRoom)\nflow.set(\"stateDiningRoom\", stateDiningRoom)\nflow.set(\"stateStairwell\", stateStairwell)\nflow.set(\"stateBasement\", stateBasement)\n\n// Define empty arrays for basement LED strip zones\nlet basement1 = []\nlet basement2 = []\nlet basementFull = []\n// Define empty arrays for living room LED strip zones\nlet livingRoom1 = []\nlet livingRoom2 = []\nlet livingRoomFull = []\n// Color names are set by default, however certain effects can override them below\nlet colorName1 = effectColor\nlet colorName2 = \"white\"\n// Define empty object for LIFX effect settings\nlet lifxData = {}\nlet effectLifx = msg.payload.event.lifx\n\n// Setup the proper zones to use for the effect\nif (effectDivide === 'half') {\n basement1 = flow.get(\"halfBasement1\", \"diskCon\")\n basement2 = flow.get(\"halfBasement2\", \"diskCon\")\n livingRoom1 = flow.get(\"halfLivingRoom1\", \"diskCon\")\n livingRoom2 = flow.get(\"halfLivingRoom2\", \"diskCon\")\n} else if (effectDivide === 'quarter') {\n basement1 = flow.get(\"effectSegBasement1\", \"diskCon\")\n basement2 = flow.get(\"effectSegBasement2\", \"diskCon\")\n livingRoom1 = flow.get(\"effectSegLivingRoom1\", \"diskCon\")\n livingRoom2 = flow.get(\"effectSegLivingRoom2\", \"diskCon\")\n} else if (effectDivide === 'full') {\n basementFull = flow.get(\"basementFull\", \"diskCon\")\n livingRoomFull = flow.get(\"livingRoomFull\", \"diskCon\")\n}\n\nif (effectFirstFloor === true) {\n flow.set('alertFirstFloor', true)\n}\n\nif (effectBasement === true) {\n flow.set('alertBasement', true)\n}\n\n// Set/change colors if necessary\nif (effectColor === 'police') {\n colorName1 = 'red'\n colorName2 = 'blue'\n}\n\n// Define parameters for different LIFX effects\nif (effectLifx === 'move') {\n lifxData = {\n \"speed\": 0.5,\n \"direction\": \"right\",\n \"power_on\": false\n }\n} else if (effectLifx === 'ping') {\n effectLifx = 'pulse'\n colorName2 = colorName1\n lifxData = {\n \"power_on\": false,\n \"mode\": \"ping\",\n \"period\": 1,\n \"cycles\": duration,\n \"color_name\": \"white\",\n \"brightness\": 255\n }\n} else if (effectLifx === 'blink') {\n effectLifx = 'pulse'\n colorName2 = colorName1\n lifxData = {\n \"power_on\": false,\n \"mode\": \"blink\",\n \"period\": 0.5,\n \"cycles\": duration * 2,\n \"color_name\": \"white\",\n \"brightness\": 255\n }\n}\n\n// Define messages\nlet sendBasementStripFX = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"effect_\" + effectLifx,\n \"target\": {\n \"entity_id\": [\"light.basement_led_strip_1\"]\n },\n \"data\": lifxData\n }\n}\n\nlet sendBasementStrip1 = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"set_state\",\n \"target\": {\n \"entity_id\": [\"light.basement_led_strip_1\"]\n },\n \"data\": {\n \"zones\": basement1,\n \"color_name\": colorName1,\n \"brightness\": 255\n }\n }\n}\n\nlet sendBasementStrip2 = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"set_state\",\n \"target\": {\n \"entity_id\": [\"light.basement_led_strip_1\"]\n },\n \"data\": {\n \"zones\": basement2,\n \"color_name\": colorName2,\n \"brightness\": 255,\n \"power\": true\n }\n }\n}\n\nlet sendBasementLights = {\n \"payload\": {\n \"domain\": \"light\",\n \"service\": \"turn_on\",\n \"target\": {\n \"entity_id\": [\n \"light.basement_tall_lamp\",\n \"light.basement_short_lamp\",\n \"light.basement_stairwell\"\n ]\n },\n \"data\": {\n \"color_name\": colorName1,\n \"brightness\": 255\n }\n }\n}\n\nlet sendLivingRoomStripFX = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"effect_\" + effectLifx,\n \"target\": {\n \"entity_id\": [\"light.living_room_led_strip\"]\n },\n \"data\": lifxData\n }\n}\n\nlet sendLivingRoomStrip1 = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"set_state\",\n \"target\": {\n \"entity_id\": [\"light.living_room_led_strip\"]\n },\n \"data\": {\n \"zones\": livingRoom1,\n \"color_name\": colorName1,\n \"brightness\": 255\n }\n }\n}\n\nlet sendLivingRoomStrip2 = {\n \"payload\": {\n \"domain\": \"lifx\",\n \"service\": \"set_state\",\n \"target\": {\n \"entity_id\": [\"light.living_room_led_strip\"]\n },\n \"data\": {\n \"zones\": livingRoom2,\n \"color_name\": colorName2,\n \"brightness\": 255,\n \"power\": true\n }\n }\n}\n\nlet sendLivingRoomLights = {\n \"payload\": {\n \"domain\": \"light\",\n \"service\": \"turn_on\",\n \"target\": {\n \"entity_id\": [\n \"light.living_room_color_1\",\n \"light.living_room_color_2\",\n \"light.living_room_color_3\",\n \"light.stairwell_led_strip\"\n ]\n },\n \"data\": {\n \"color_name\": colorName1,\n \"brightness\": 255\n }\n }\n}\n\nlet sendTinaDeskLights = {\n \"payload\": {\n \"domain\": \"light\",\n \"service\": \"turn_on\",\n \"target\": {\n \"entity_id\": [\"light.tina_desk_lights\"]\n },\n \"data\": {\n \"color_name\": colorName1,\n \"brightness\": 255\n }\n }\n}\n\nlet sendDiningRoomLamp = {\n \"payload\": {\n \"domain\": \"light\",\n \"service\": \"turn_off\",\n \"target\": {\n \"entity_id\": [\"light.dining_room_lamp\"]\n },\n \"data\": {}\n }\n}\n\nlet sendAdaptiveFirstFloor = {\n \"payload\": {\n \"domain\": \"switch\",\n \"service\": \"turn_off\",\n \"target\": {\n \"entity_id\": adaptiveSwitchFirstFloor\n },\n \"data\": {}\n }\n}\n\nlet sendAdaptiveBasement = {\n \"payload\": {\n \"domain\": \"switch\",\n \"service\": \"turn_off\",\n \"target\": {\n \"entity_id\": adaptiveSwitchBasement\n },\n \"data\": {}\n }\n}\n\nlet backupLivingRoom = {\n \"payload\": {\n \"domain\": \"scene\",\n \"service\": \"create\",\n \"data\": {\n \"scene_id\": \"living_room_alert_restore\",\n \"snapshot_entities\": lightsLivingRoom\n }\n }\n}\n\nlet backupTinaDesk = {\n \"payload\": {\n \"domain\": \"scene\",\n \"service\": \"create\",\n \"data\": {\n \"scene_id\": \"tina_desk_alert_restore\",\n \"snapshot_entities\": lightsTinaDesk\n }\n }\n}\n\nlet backupBasement = {\n \"payload\": {\n \"domain\": \"scene\",\n \"service\": \"create\",\n \"data\": {\n \"scene_id\": \"basement_alert_restore\",\n \"snapshot_entities\": lightsBasement\n }\n }\n}\n\nlet sendReset = {\n \"delay\": delay\n}\n\nlet sendDebug = {\n \"topic\": \"debug\",\n \"colorName1\": colorName1,\n \"colorName2\": colorName2,\n \"lifxData\": lifxData,\n \"effectLifx\": effectLifx,\n \"basement1\": basement1,\n \"basement2\": basement2\n}\n\n// Send backup messages\nif (stateLivingRoom === 'on' && alertFirstFloor === false) {\n node.send([backupLivingRoom,null,null,null,null,null])\n}\n\nif (stateTinaDesk === 'on' && alertFirstFloor === false) {\n node.send([backupTinaDesk,null,null,null,null,null])\n}\n\nif (stateBasement === 'on' && alertBasement === false) {\n node.send([backupBasement,null,null,null,null,null])\n}\n\n// Send effect messages\nif (effectBasement === true) {\n node.send([null,null,null,null,[sendAdaptiveBasement,sendBasementLights,sendBasementStripFX,sendBasementStrip1,sendBasementStrip2,sendDebug],null])\n}\n\nif (effectFirstFloor === true) {\n node.send([null,[sendAdaptiveFirstFloor,sendLivingRoomLights,sendLivingRoomStripFX,sendLivingRoomStrip1,sendLivingRoomStrip2],sendTinaDeskLights,sendDiningRoomLamp,null,null])\n}\n\n// Send the reset message to start the timer\nnode.send([null,null,null,null,null,sendReset])\n\nnode.status({fill:'green',shape:'dot',text:'Alert Sent'})", "outputs": 6, "timeout": 0, "noerr": 0, @@ -13860,7 +13860,8 @@ ], [ "4165ae582e799463", - "c6886c9ecbce28c1" + "c6886c9ecbce28c1", + "2257169d22e3d25b" ], [ "561b936b324b33de" @@ -14395,6 +14396,69 @@ "y": 800, "wires": [] }, + { + "id": "adbe84ebbb7cecf7", + "type": "debug", + "z": "ce9c810396e540b6", + "name": "Basement Debug", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 850, + "y": 420, + "wires": [] + }, + { + "id": "2257169d22e3d25b", + "type": "switch", + "z": "ce9c810396e540b6", + "name": "", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "debug", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 595, + "y": 420, + "wires": [ + [ + "adbe84ebbb7cecf7" + ] + ], + "l": false + }, + { + "id": "7d61e551752dd728", + "type": "comment", + "z": "ce9c810396e540b6", + "name": "Should only restore floors that were affected", + "info": "", + "x": 930, + "y": 740, + "wires": [] + }, + { + "id": "32246efc51c9a579", + "type": "comment", + "z": "ce9c810396e540b6", + "name": "Strip effect is not being stopped on completion", + "info": "", + "x": 930, + "y": 800, + "wires": [] + }, { "id": "7611921cadb91b1e", "type": "api-call-service",