Rework speech engine subflow

This commit is contained in:
2023-03-05 16:10:42 -05:00
parent 71340fda12
commit 00f3e15185

View File

@ -246,8 +246,8 @@
], ],
"out": [ "out": [
{ {
"x": 1220, "x": 820,
"y": 220, "y": 160,
"wires": [ "wires": [
{ {
"id": "98bf66889d4287db", "id": "98bf66889d4287db",
@ -1142,9 +1142,7 @@
"c7a8df4ebeb3b5c5" "c7a8df4ebeb3b5c5"
], ],
"x": 54, "x": 54,
"y": 19, "y": 19
"w": 2092,
"h": 282
}, },
{ {
"id": "0c81dfaed25d225c", "id": "0c81dfaed25d225c",
@ -1532,18 +1530,6 @@
] ]
] ]
}, },
{
"id": "0dd0e5b7bace6c62",
"type": "junction",
"z": "6429099c4571dd6b",
"x": 1140,
"y": 140,
"wires": [
[
"98bf66889d4287db"
]
]
},
{ {
"id": "9e87348d.9c1c48", "id": "9e87348d.9c1c48",
"type": "server", "type": "server",
@ -3018,14 +3004,14 @@
"areaId": [], "areaId": [],
"deviceId": [], "deviceId": [],
"entityId": [], "entityId": [],
"data": "{\t \"who\": msg.topic,\t \"message\": msg.payload,\t \"voice\": msg.voice\t}", "data": "{\t \"who\": msg.topic,\t \"message\": msg.payload,\t \"voice\": msg.voice,\t \"type\": msg.type\t}",
"dataType": "jsonata", "dataType": "jsonata",
"mergeContext": "", "mergeContext": "",
"mustacheAltTags": false, "mustacheAltTags": false,
"outputProperties": [], "outputProperties": [],
"queue": "none", "queue": "none",
"x": 1080, "x": 680,
"y": 220, "y": 160,
"wires": [ "wires": [
[] []
] ]
@ -3045,186 +3031,29 @@
"y": 160, "y": 160,
"wires": [ "wires": [
[ [
"c8bf676e64a58c64" "1d325524a8e8d1c6"
] ]
] ]
}, },
{ {
"id": "c8bf676e64a58c64", "id": "1d325524a8e8d1c6",
"type": "api-current-state", "type": "function",
"z": "6429099c4571dd6b", "z": "6429099c4571dd6b",
"name": "Is stream live?", "name": "Type",
"server": "9e87348d.9c1c48", "func": "if (msg.type) {\n msg.type = msg.type\n} else {\n msg.type = \"normal\"\n}\nreturn msg;",
"version": 3, "outputs": 1,
"outputs": 2, "noerr": 0,
"halt_if": "on", "initialize": "",
"halt_if_type": "str", "finalize": "",
"halt_if_compare": "is", "libs": [],
"entity_id": "input_boolean.studio_quiet", "x": 510,
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "streamlive",
"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": 540,
"y": 160, "y": 160,
"wires": [ "wires": [
[
"42a0978dfdc73f5d"
],
[ [
"98bf66889d4287db" "98bf66889d4287db"
] ]
] ]
}, },
{
"id": "82403ec40dbe9330",
"type": "change",
"z": "6429099c4571dd6b",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "living_room",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 990,
"y": 20,
"wires": [
[
"0dd0e5b7bace6c62"
]
]
},
{
"id": "42a0978dfdc73f5d",
"type": "switch",
"z": "6429099c4571dd6b",
"name": "Dest Switch",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "common",
"vt": "str"
},
{
"t": "eq",
"v": "basement",
"vt": "str"
},
{
"t": "eq",
"v": "everywhere",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 770,
"y": 140,
"wires": [
[
"82403ec40dbe9330"
],
[
"a793ddc6663c5b63"
],
[
"055cd6fbc76af001"
],
[
"98bf66889d4287db"
]
]
},
{
"id": "a793ddc6663c5b63",
"type": "change",
"z": "6429099c4571dd6b",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "living_room",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "I cannot play notifications in the basement while the stream is live",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1000,
"y": 80,
"wires": [
[
"0dd0e5b7bace6c62"
]
]
},
{
"id": "055cd6fbc76af001",
"type": "change",
"z": "6429099c4571dd6b",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "alexa_no_basement",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 990,
"y": 140,
"wires": [
[
"0dd0e5b7bace6c62"
]
]
},
{ {
"id": "cee2f20718ddb03a", "id": "cee2f20718ddb03a",
"type": "function", "type": "function",