Migrate a few more flows to the new notify framework

This commit is contained in:
2023-04-21 14:56:26 -04:00
parent 1833399c3f
commit 52f940e0d9

View File

@ -725,7 +725,9 @@
"37f1c11c59a6ce16"
],
"x": 94,
"y": 339
"y": 339,
"w": 1872,
"h": 622
},
{
"id": "39a7ac02f2727f1d",
@ -990,7 +992,9 @@
"7cb8056b3b41a9e8"
],
"x": 34,
"y": 779
"y": 779,
"w": 1012,
"h": 442
},
{
"id": "f55a52c40b8b8749",
@ -1035,7 +1039,9 @@
"318bee4424125dd5"
],
"x": 34,
"y": 19
"y": 19,
"w": 832,
"h": 742
},
{
"id": "208284848b13b85b",
@ -1066,7 +1072,9 @@
"1e1891c23a6e7e64"
],
"x": 34,
"y": 239
"y": 239,
"w": 1132,
"h": 382
},
{
"id": "1ca205a84922c8c2",
@ -1151,7 +1159,9 @@
"f5fb96bf1a33b3cd"
],
"x": 54,
"y": 19
"y": 19,
"w": 1492,
"h": 282
},
{
"id": "0c81dfaed25d225c",
@ -1205,7 +1215,9 @@
"b281061a4b08d2eb"
],
"x": 14,
"y": 539
"y": 539,
"w": 612,
"h": 202
},
{
"id": "550e5b2d99316b12",
@ -1228,7 +1240,9 @@
"61cb79c998ee0b59"
],
"x": 34,
"y": 639
"y": 639,
"w": 1072,
"h": 202
},
{
"id": "f519aff597ece351",
@ -3889,12 +3903,12 @@
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "notify",
"service": "living_room_tv",
"domain": "script",
"service": "tv_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"25%\",\t \"color\": \"red\"\t }\t}",
"data": "{\t \"who\": \"living_room\",\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"25%\",\t \"color\": \"red\"\t }\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
@ -3914,12 +3928,12 @@
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "notify",
"service": "master_bedroom_tv",
"domain": "script",
"service": "tv_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"30%\",\t \"color\": \"red\"\t }\t}",
"data": "{\t \"who\": \"master_bedroom\",\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"30%\",\t \"color\": \"red\"\t }\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
@ -4386,12 +4400,12 @@
"server": "9e87348d.9c1c48",
"version": 5,
"debugenabled": false,
"domain": "notify",
"service": "basement_tv",
"domain": "script",
"service": "tv_notify",
"areaId": [],
"deviceId": [],
"entityId": [],
"data": "{\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"30%\",\t \"color\": \"red\"\t }\t}",
"data": "{\t \"who\": \"basement\",\t \"title\": msg.topic,\t \"message\": msg.payload,\t \"data\": {\t \"fontsize\": \"large\",\t \"duration\": 3,\t \"transparency\": \"30%\",\t \"color\": \"red\"\t }\t}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
@ -10354,63 +10368,6 @@
]
]
},
{
"id": "f066d04f1ecfa17a",
"type": "server-state-changed",
"z": "eff21041cc941fef",
"name": "Front Porch Scenes",
"server": "9e87348d.9c1c48",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.front_porch_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": 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": "topic",
"propertyType": "msg",
"value": "front_porch",
"valueType": "str"
}
],
"x": 110,
"y": 280,
"wires": [
[
"d790134891fedfcc"
]
]
},
{
"id": "e689231430e9c829",
"type": "server-state-changed",
@ -10557,7 +10514,7 @@
}
],
"x": 120,
"y": 340,
"y": 280,
"wires": [
[
"d790134891fedfcc"
@ -10744,7 +10701,7 @@
}
],
"x": 110,
"y": 400,
"y": 340,
"wires": [
[
"b19f4a996fd4c2ee",
@ -10758,7 +10715,7 @@
"z": "eff21041cc941fef",
"name": "",
"x": 590,
"y": 400,
"y": 340,
"wires": []
},
{
@ -14426,109 +14383,6 @@
],
"icon": "font-awesome/fa-check"
},
{
"id": "edef3ad58f6e9bbd",
"type": "api-current-state",
"z": "b5717a86ce55bc29",
"d": true,
"name": "Early Night Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.early_night_mode",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 170,
"y": 440,
"wires": [
[
"780ad4c1a1d5204b"
],
[]
]
},
{
"id": "780ad4c1a1d5204b",
"type": "api-current-state",
"z": "b5717a86ce55bc29",
"d": true,
"name": "Front Porch Toggle",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.front_porch_light_on",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 390,
"y": 440,
"wires": [
[
"94faa23771cc9cd6"
],
[]
]
},
{
"id": "94faa23771cc9cd6",
"type": "function",
"z": "b5717a86ce55bc29",
"d": true,
"name": "Holiday Code",
"func": "var holidaymode = global.get('holidaymode')\nvar currentholiday = global.get('currentholiday')\nvar holiday = currentholiday.toLowerCase()\n\nif (holidaymode === 'on') {\n msg.holiday = holiday\n return [msg,null]\n} else {\n return [null,msg]\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 600,
"y": 440,
"wires": [
[],
[]
],
"outputLabels": [
"Holiday On",
"Holiday Off"
]
},
{
"id": "3a5bb57569e07beb",
"type": "function",
@ -14557,16 +14411,6 @@
],
"icon": "node-red-contrib-huemagic/hue-motion.svg"
},
{
"id": "0ee23da3fa6a6183",
"type": "comment",
"z": "b5717a86ce55bc29",
"name": "Old Check Parameters",
"info": "",
"x": 180,
"y": 380,
"wires": []
},
{
"id": "76815f07ec2f3eef",
"type": "function",
@ -14617,120 +14461,69 @@
"icon": "font-awesome/fa-power-off"
},
{
"id": "51237623ed73ba98",
"type": "api-current-state",
"id": "af64b56e28c93907",
"type": "server-state-changed",
"z": "b5717a86ce55bc29",
"d": true,
"name": "Front Porch Toggle",
"name": "Front Porch Scenes",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "on",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "input_select.front_porch_scenes",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.front_porch_light_on",
"state_type": "str",
"blockInputOverrides": false,
"outputs": 1,
"output_only_on_state_change": 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"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 910,
"y": 440,
"wires": [
[
"3e6caa91031ab102"
],
[]
]
},
{
"id": "dfa6bff034d7d522",
"type": "function",
"z": "b5717a86ce55bc29",
"d": true,
"name": "Holiday Code",
"func": "var holidaymode = global.get('holidaymode')\nvar currentholiday = global.get('currentholiday')\nvar holiday = currentholiday.toLowerCase()\n\nif (holidaymode === 'on') {\n msg.holiday = holiday\n return [msg,null]\n} else {\n return [null,msg]\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1320,
"y": 440,
"wires": [
[],
[]
],
"outputLabels": [
"Holiday On",
"Holiday Off"
]
},
{
"id": "3e6caa91031ab102",
"type": "api-current-state",
"z": "b5717a86ce55bc29",
"d": true,
"name": "Delivery Mode",
"server": "9e87348d.9c1c48",
"version": 3,
"outputs": 2,
"halt_if": "off",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "input_boolean.delivery_mode",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
},
{
"property": "payload",
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
"value": "front_porch",
"valueType": "str"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 1120,
"y": 440,
"x": 170,
"y": 360,
"wires": [
[
"dfa6bff034d7d522"
],
[]
],
"outputLabels": [
"Off",
"On"
"3747d0c21057f3a6"
]
]
},
{
"id": "072d53ce4582a2f9",
"type": "comment",
"id": "3747d0c21057f3a6",
"type": "subflow:a4ee891237e460a2",
"z": "b5717a86ce55bc29",
"name": "Old Shut Off",
"info": "",
"x": 890,
"y": 380,
"name": "",
"x": 400,
"y": 360,
"wires": []
},
{