@mickym said in Zigbee2mqtt installation:
@schmetterfliege Na nur der untere Teil interessiert im Moment.
Spoiler
[
{
"id": "bb907a827dac8189",
"type": "change",
"z": "8b753c91a6565074",
"name": "LastUpdate setzen",
"rules": [
{
"t": "set",
"p": "payload.lastupdate",
"pt": "msg",
"to": "$moment($lookup($flowContext(\"timestamps\"), topic)).locale(\"de\").fromNow()",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 850,
"y": 760,
"wires": [
[
"d37949aae2f7b3e9"
]
]
},
{
"id": "17b085e0c0d554ca",
"type": "switch",
"z": "8b753c91a6565074",
"name": "",
"property": "$exists($lookup($flowContext(\"timestamps\"),topic))",
"propertyType": "jsonata",
"rules": [
{
"t": "true"
},
{
"t": "false"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 630,
"y": 780,
"wires": [
[
"bb907a827dac8189"
],
[
"30a688d3f7589a39"
]
]
},
{
"id": "30a688d3f7589a39",
"type": "change",
"z": "8b753c91a6565074",
"name": "LastUpdate setzen",
"rules": [
{
"t": "set",
"p": "payload.lastupdate",
"pt": "msg",
"to": "nicht verfügbar",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 850,
"y": 800,
"wires": [
[
"d37949aae2f7b3e9"
]
]
}
]
Okay, hatte deine (erste) Frage falsch verstanden, my bad.
Hast recht, das ist deutlich kompakter als ich es mir vorgestellt habe - worth it :)