translate ui timers (scene not tranlsated) & cleanup

This commit is contained in:
JcDenis 2024-08-21 11:16:51 +02:00
parent 9aed5f45f6
commit 29784e4928
5 changed files with 607 additions and 1029 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -119,40 +119,6 @@
"w": 2564,
"h": 2594
},
{
"id": "690626cfbeb2561c",
"type": "group",
"z": "bcb4426f5301b9f2",
"name": "routine mode",
"style": {
"fill-opacity": "0.05",
"label": true,
"fill": "#92d04f",
"stroke": "#92d04f"
},
"nodes": [
"bad6bd5983b2fc9f",
"c30c5a2566decb7b",
"f102fde8fbfe7c18",
"3ace672b36b6d59a",
"da8810eee603cc4b",
"f887a03f0fb2827a",
"303274117f982501",
"d5c3ea38b7e24cce",
"73754465446fef43",
"1f5be99b367a12d0",
"0e78c14186033ece",
"000413191731e86e",
"af2d889126787278",
"e763cda95bda7657",
"d5b08905e305cd02",
"920db71eee0d2d26"
],
"x": 2754,
"y": 2119,
"w": 2552,
"h": 382
},
{
"id": "29b883f9654391c8",
"type": "group",
@ -6859,453 +6825,6 @@
]
]
},
{
"id": "bad6bd5983b2fc9f",
"type": "switch",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "mode automate",
"property": "metrics.system.mode.automate",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "automatic",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 3720,
"y": 2340,
"wires": [
[
"f887a03f0fb2827a"
],
[
"73754465446fef43"
]
]
},
{
"id": "c30c5a2566decb7b",
"type": "switch",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "mode type exists",
"property": "metrics.system.mode",
"propertyType": "global",
"rules": [
{
"t": "hask",
"v": "scene.type",
"vt": "msg"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 4170,
"y": 2220,
"wires": [
[
"f102fde8fbfe7c18"
],
[
"303274117f982501"
]
]
},
{
"id": "f102fde8fbfe7c18",
"type": "switch",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "mode type not off",
"property": "metrics.system.mode[msg.scene.type]",
"propertyType": "global",
"rules": [
{
"t": "neq",
"v": "off",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 4410,
"y": 2160,
"wires": [
[
"303274117f982501"
],
[
"73754465446fef43"
]
]
},
{
"id": "3ace672b36b6d59a",
"type": "switch",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "mode master",
"property": "metrics.system.mode.master",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "about.automate",
"vt": "global"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 3490,
"y": 2400,
"wires": [
[
"bad6bd5983b2fc9f"
],
[
"73754465446fef43"
]
]
},
{
"id": "da8810eee603cc4b",
"type": "switch",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "actif",
"property": "routine.actif",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 4850,
"y": 2280,
"wires": [
[
"d5c3ea38b7e24cce"
],
[
"73754465446fef43"
]
]
},
{
"id": "f887a03f0fb2827a",
"type": "switch",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "system bucket",
"property": "scene.bucket",
"propertyType": "msg",
"rules": [
{
"t": "neq",
"v": "system",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 3940,
"y": 2280,
"wires": [
[
"c30c5a2566decb7b"
],
[
"303274117f982501"
]
]
},
{
"id": "303274117f982501",
"type": "switch",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "system bucket",
"property": "scene.bucket",
"propertyType": "msg",
"rules": [
{
"t": "neq",
"v": "system",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 4660,
"y": 2340,
"wires": [
[
"da8810eee603cc4b"
],
[
"73754465446fef43"
]
]
},
{
"id": "d5c3ea38b7e24cce",
"type": "change",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "rsp 1",
"rules": [
{
"t": "set",
"p": "routine.response",
"pt": "msg",
"to": "1",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5010,
"y": 2340,
"wires": [
[
"1f5be99b367a12d0",
"000413191731e86e"
]
]
},
{
"id": "73754465446fef43",
"type": "change",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "rsp -1",
"rules": [
{
"t": "set",
"p": "routine.response",
"pt": "msg",
"to": "-1",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5010,
"y": 2400,
"wires": [
[
"1f5be99b367a12d0",
"000413191731e86e"
]
]
},
{
"id": "1f5be99b367a12d0",
"type": "debug",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "routine mode",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 5190,
"y": 2400,
"wires": []
},
{
"id": "0e78c14186033ece",
"type": "link in",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "routine mode",
"links": [],
"x": 2795,
"y": 2460,
"wires": [
[
"920db71eee0d2d26"
]
]
},
{
"id": "000413191731e86e",
"type": "link out",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "routine mode",
"mode": "return",
"links": [],
"x": 5135,
"y": 2460,
"wires": []
},
{
"id": "af2d889126787278",
"type": "link call",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "",
"links": [
"e520201563045cb4"
],
"linkType": "static",
"timeout": "30",
"x": 3130,
"y": 2460,
"wires": [
[
"e763cda95bda7657"
]
]
},
{
"id": "e763cda95bda7657",
"type": "switch",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 3310,
"y": 2460,
"wires": [
[
"3ace672b36b6d59a"
],
[
"d5b08905e305cd02"
]
]
},
{
"id": "d5b08905e305cd02",
"type": "change",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "rsp 0",
"rules": [
{
"t": "set",
"p": "routine.response",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5010,
"y": 2460,
"wires": [
[
"1f5be99b367a12d0",
"000413191731e86e"
]
]
},
{
"id": "920db71eee0d2d26",
"type": "delay",
"z": "bcb4426f5301b9f2",
"d": true,
"g": "690626cfbeb2561c",
"name": "150 ms",
"pauseType": "delay",
"timeout": "150",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 2940,
"y": 2460,
"wires": [
[
"af2d889126787278"
]
]
},
{
"id": "73cc2886c2652521",
"type": "change",

View file

@ -8432,7 +8432,7 @@
"type": "change",
"z": "80f2ffd4953c67e9",
"g": "e6edd4684b272434",
"name": "thermostat / cold setpoint / number / 0",
"name": "thermostat / cold setpoint / number / 18",
"rules": [
{
"t": "set",
@ -8452,7 +8452,7 @@
"t": "set",
"p": "default",
"pt": "msg",
"to": "0",
"to": "18",
"tot": "num"
}
],
@ -9481,7 +9481,7 @@
"type": "comment",
"z": "80f2ffd4953c67e9",
"g": "e6edd4684b272434",
"name": "set \"cold setpoint\" to 0 to disable it",
"name": "set \"cold setpoint\" to 18 to disable it",
"info": "",
"x": 260,
"y": 480,

View file

@ -475,7 +475,6 @@
"3cc31621bae4b8f4",
"fad6ea5928c43d20",
"c44490a40f109a5c",
"14f915e43eee9cb9",
"3373b870924b043e",
"e26532940aaa52c6",
"b4802ba3090bfb72",
@ -487,11 +486,15 @@
"8009a084ca3785ef",
"f53cc6991fe5640c",
"c0a84f51998336e3",
"da26fce301e2b672"
"da26fce301e2b672",
"fb5a869082c28238",
"4e15e2ceec7f8bf0",
"b70d53e7c8c8615f",
"0ca8ceaa6a406075"
],
"x": 94,
"y": 3679,
"w": 2072,
"w": 2472,
"h": 262
},
{
@ -5018,7 +5021,7 @@
"y": 3780,
"wires": [
[
"fad6ea5928c43d20"
"fb5a869082c28238"
]
]
},
@ -5091,41 +5094,6 @@
]
]
},
{
"id": "14f915e43eee9cb9",
"type": "change",
"z": "677f66663a198839",
"g": "57bf8eefe70206c0",
"name": "add",
"rules": [
{
"t": "set",
"p": "tmp",
"pt": "msg",
"to": "$split(payload.timer.path,'/')",
"tot": "jsonata"
},
{
"t": "set",
"p": "#:(onMemory)::timers[msg.parts.index]",
"pt": "flow",
"to": "{\t \"Scène\":msg.tmp[0],\t \"Pièce\":msg.tmp[1],\t \"Equipement\":msg.tmp[3],\t \"Champs\":msg.tmp[2],\t \"Fin\":msg.date\t }",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1570,
"y": 3720,
"wires": [
[
"3373b870924b043e"
]
]
},
{
"id": "3373b870924b043e",
"type": "join",
@ -5147,7 +5115,7 @@
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 1730,
"x": 2130,
"y": 3720,
"wires": [
[
@ -5182,7 +5150,7 @@
"from": "",
"to": "",
"reg": false,
"x": 1910,
"x": 2310,
"y": 3720,
"wires": [
[
@ -5204,7 +5172,7 @@
"maxrows": 0,
"autocols": true,
"columns": [],
"x": 2090,
"x": 2490,
"y": 3780,
"wires": [
[]
@ -5493,7 +5461,7 @@
"y": 3720,
"wires": [
[
"14f915e43eee9cb9"
"4e15e2ceec7f8bf0"
]
]
},
@ -12389,5 +12357,134 @@
"x": 615,
"y": 4080,
"wires": []
},
{
"id": "fb5a869082c28238",
"type": "trigger",
"z": "677f66663a198839",
"g": "57bf8eefe70206c0",
"name": "wait 500 ms",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "payl",
"duration": "500",
"extend": true,
"overrideDelay": false,
"units": "ms",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 290,
"y": 3780,
"wires": [
[
"fad6ea5928c43d20"
]
]
},
{
"id": "4e15e2ceec7f8bf0",
"type": "change",
"z": "677f66663a198839",
"g": "57bf8eefe70206c0",
"name": "metric",
"rules": [
{
"t": "set",
"p": "metric",
"pt": "msg",
"to": "payload.timer.path",
"tot": "msg"
},
{
"t": "set",
"p": "metric",
"pt": "msg",
"to": "$split(msg.metric,'/')",
"tot": "jsonata"
},
{
"t": "set",
"p": "scene",
"pt": "msg",
"to": "metric[0]",
"tot": "msg"
},
{
"t": "set",
"p": "metric",
"pt": "msg",
"to": "msg.metric[1]&'/'&msg.metric[2]&'/'&msg.metric[3]",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1570,
"y": 3720,
"wires": [
[
"b70d53e7c8c8615f"
]
]
},
{
"id": "b70d53e7c8c8615f",
"type": "link call",
"z": "677f66663a198839",
"g": "57bf8eefe70206c0",
"name": "",
"links": [
"025e219749a67439"
],
"linkType": "static",
"timeout": "30",
"x": 1770,
"y": 3720,
"wires": [
[
"0ca8ceaa6a406075"
]
]
},
{
"id": "0ca8ceaa6a406075",
"type": "change",
"z": "677f66663a198839",
"g": "57bf8eefe70206c0",
"name": "add",
"rules": [
{
"t": "set",
"p": "tmp",
"pt": "msg",
"to": "$split(msg.payload.timer.path,'/')",
"tot": "jsonata"
},
{
"t": "set",
"p": "#:(onMemory)::timers[msg.parts.index]",
"pt": "flow",
"to": "{\t \"Scène\":msg.scene,\t \"Pièce\":msg.trans.bucket,\t \"Equipement\":msg.trans.measurement,\t \"Champs\":msg.trans.field,\t \"Fin\":msg.date\t }",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1970,
"y": 3720,
"wires": [
[
"3373b870924b043e"
]
]
}
]