Update flow files

This commit is contained in:
2026-05-28 20:35:25 +02:00
parent b855941948
commit 73b78867b8
+208 -144
View File
@@ -1,11 +1,4 @@
[
{
"id": "da896085.24c698",
"type": "tab",
"label": "Home Media",
"disabled": true,
"info": ""
},
{
"id": "a9edb9da.ccb6d",
"type": "tab",
@@ -1700,143 +1693,6 @@
"x": 520,
"y": 100
},
{
"id": "c8d37a58.56051",
"type": "server-state-changed",
"z": "da896085.24c698",
"name": "Remote is on",
"wires": [
[
"73d6c796.13d8f8"
],
[]
],
"server": "657c7463.48e1e4",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"remote.living_room"
],
"substring": [],
"regex": []
},
"outputInitially": true,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 130,
"y": 80
},
{
"id": "275763d9.2d137c",
"type": "debug",
"z": "da896085.24c698",
"name": "",
"wires": [],
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 590,
"y": 260
},
{
"id": "73d6c796.13d8f8",
"type": "switch",
"z": "da896085.24c698",
"name": "",
"wires": [
[
"275763d9.2d137c"
],
[],
[]
],
"property": "data.new_state.attributes.current_activity",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Entertainment",
"vt": "str"
},
{
"t": "eq",
"v": "Playstation",
"vt": "str"
},
{
"t": "eq",
"v": "Play Record",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 390,
"y": 80
},
{
"id": "f337ae51.b639e",
"type": "api-call-service",
"z": "da896085.24c698",
"name": "Switch to TV Scene",
"wires": [
[]
],
"server": "657c7463.48e1e4",
"version": 7,
"debugenabled": false,
"action": "script.scene_watch_tv",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "scene_watch_tv",
"output_location": "",
"output_location_type": "none",
"x": 890,
"y": 60
},
{
"id": "f3a37054.39c5e",
"type": "server-state-changed",
@@ -22658,5 +22514,213 @@
"output_location_type": "none",
"x": 660,
"y": 2300
},
{
"type": "tab",
"label": "Home Media",
"id": "da896085.24c698"
},
{
"id": "c8d37a58.56051",
"type": "server-state-changed",
"z": "da896085.24c698",
"name": "Remote is on",
"wires": [
[
"73d6c796.13d8f8"
],
[]
],
"server": "657c7463.48e1e4",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"remote.living_room"
],
"substring": [],
"regex": []
},
"outputInitially": true,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 130,
"y": 80
},
{
"id": "275763d9.2d137c",
"type": "debug",
"z": "da896085.24c698",
"name": "",
"wires": [],
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"x": 590,
"y": 260
},
{
"id": "73d6c796.13d8f8",
"type": "switch",
"z": "da896085.24c698",
"name": "",
"wires": [
[
"275763d9.2d137c"
],
[],
[]
],
"property": "data.new_state.attributes.current_activity",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Entertainment",
"vt": "str"
},
{
"t": "eq",
"v": "Playstation",
"vt": "str"
},
{
"t": "eq",
"v": "Play Record",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 390,
"y": 80
},
{
"id": "f337ae51.b639e",
"type": "api-call-service",
"z": "da896085.24c698",
"name": "Switch to TV Scene",
"wires": [
[]
],
"server": "657c7463.48e1e4",
"version": 7,
"debugenabled": false,
"action": "script.scene_watch_tv",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [],
"labelId": [],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "script",
"service": "scene_watch_tv",
"output_location": "",
"output_location_type": "none",
"x": 890,
"y": 60
},
{
"id": "p2catch_med",
"type": "catch",
"z": "da896085.24c698",
"name": "Catch all errors",
"wires": [
[
"p2fmt_med"
]
],
"scope": null,
"uncaught": false,
"x": 160,
"y": 460
},
{
"id": "p2fmt_med",
"type": "function",
"z": "da896085.24c698",
"name": "Format error",
"wires": [
[
"p2ntfy_med"
]
],
"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: Home Media',\n message: err + (src ? '\\n\\nNode: ' + src : '')\n});\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"timeout": "",
"x": 400,
"y": 460
},
{
"id": "p2ntfy_med",
"type": "api-call-service",
"z": "da896085.24c698",
"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": 460
}
]