[
{
"id": "d3906e60.96d4",
"type": "homeeDevice",
"z": "e92f9430.a6cd58",
"virtual-homee": "",
"name": "LED strip TV",
"nodeId": "16",
"showNodeId": true,
"profile": "1002",
"icon": "nodeicon_tv",
"attributes": [
{
"instance": 0,
"minimum": 0,
"maximum": 1,
"current_value": 0,
"target_value": 0,
"last_value": 0,
"unit": "n%2Fa",
"step_value": 1,
"editable": 1,
"state": 1,
"last_changed": 1572944008,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"data": "",
"type": 1,
"id": "160",
"node_id": "16"
},
{
"type": 2,
"state": 1,
"instance": 0,
"minimum": 0,
"maximum": 1000,
"current_value": 0,
"target_value": 0,
"last_value": 0,
"data": "",
"name": "",
"unit": "%25",
"step_value": 1,
"editable": 1,
"last_changed": 1646564312,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"options": [],
"id": "161",
"node_id": "16"
},
{
"type": 2,
"state": 1,
"instance": 1,
"minimum": 80,
"maximum": 100,
"current_value": 80,
"target_value": 0,
"last_value": 0,
"data": "",
"name": "Szene",
"unit": "",
"step_value": 1,
"editable": 1,
"last_changed": 1646564337,
"changed_by": 1,
"changed_by_id": 0,
"based_on": 1,
"options": [],
"id": "162",
"node_id": "16"
}
],
"statusTemplate": "",
"x": 750,
"y": 240,
"wires": [
[
"42651e79.b56f3",
"5659a4d6.9f1ffc",
"1182a81d.67cd68"
]
]
},
{
"id": "42651e79.b56f3",
"type": "function",
"z": "e92f9430.a6cd58",
"name": "LED strip TV Ein/Aus von homee",
"func": "if (msg.payload.attributeId == 160)\n{\nif (msg.payload.targetValue === 0) {\n return [{\n payload:false}];\n}\nif (msg.payload.targetValue == 1) {\n return [{\n payload:true}];\n}\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1060,
"y": 200,
"wires": [
[
"cc6e7768.e67988"
]
]
},
{
"id": "cc6e7768.e67988",
"type": "ioBroker out",
"z": "e92f9430.a6cd58",
"name": "switch_led",
"topic": "tuya.0.bff049b02f35934de3pc6c.20",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1310,
"y": 200,
"wires": []
},
{
"id": "df0d3064.f2d38",
"type": "ioBroker in",
"z": "e92f9430.a6cd58",
"name": "switch_led",
"topic": "tuya.0.bff049b02f35934de3pc6c.20",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "false",
"x": 140,
"y": 200,
"wires": [
[
"ca95da54.a798b8"
]
]
},
{
"id": "ca95da54.a798b8",
"type": "function",
"z": "e92f9430.a6cd58",
"name": "LED strip TV Ein/Aus nach homee",
"func": "if (msg.payload == 'false') {\n return [{\n payload:{\"attribute\":{\"id\":160,\"value\":0}}}];\n}\n\nif (msg.payload == 'true') {\n return [{\n payload:{\"attribute\":{\"id\":160,\"value\":1}}}];\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 460,
"y": 200,
"wires": [
[
"d3906e60.96d4"
]
]
},
{
"id": "5659a4d6.9f1ffc",
"type": "function",
"z": "e92f9430.a6cd58",
"name": "LED strip TV Level von homee",
"func": "if (msg.payload.attributeId == 161)\n{\n return [{\n payload:msg.payload.targetValue}];\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1050,
"y": 280,
"wires": [
[
"b6d1405d.45ce7"
]
]
},
{
"id": "b6d1405d.45ce7",
"type": "ioBroker out",
"z": "e92f9430.a6cd58",
"name": "bright_value",
"topic": "tuya.0.bff049b02f35934de3pc6c.22",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1290,
"y": 280,
"wires": []
},
{
"id": "8a31448f.eadbf8",
"type": "ioBroker in",
"z": "e92f9430.a6cd58",
"name": "bright_value",
"topic": "tuya.0.bff049b02f35934de3pc6c.22",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "false",
"x": 150,
"y": 280,
"wires": [
[
"8dd5e657.6e1cd8"
]
]
},
{
"id": "8dd5e657.6e1cd8",
"type": "function",
"z": "e92f9430.a6cd58",
"name": "LED strip TV Level nach homee",
"func": "var Level = Number(msg.payload);\nmsg.payload = {\"attribute\":{\"id\":161,\"value\":Level}};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 470,
"y": 280,
"wires": [
[
"d3906e60.96d4"
]
]
},
{
"id": "25cfdd08.084112",
"type": "ioBroker in",
"z": "e92f9430.a6cd58",
"name": "scene_data",
"topic": "tuya.0.bff049b02f35934de3pc6c.25",
"payloadType": "value",
"onlyack": "",
"func": "all",
"gap": "",
"fireOnStart": "false",
"x": 150,
"y": 400,
"wires": [
[
"3a1a93ab.15b84c"
]
]
},
{
"id": "3a1a93ab.15b84c",
"type": "function",
"z": "e92f9430.a6cd58",
"name": "LED strip TV szenen Level nach homee",
"func": "var Level = Number(msg.payload.slice(0,2));\nmsg.payload = {\"attribute\":{\"id\":162,\"value\":Level}};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 500,
"y": 400,
"wires": [
[
"d3906e60.96d4"
]
]
},
{
"id": "1182a81d.67cd68",
"type": "function",
"z": "e92f9430.a6cd58",
"name": "LED strip TV szene von homee",
"func": "if (msg.payload.attributeId == 162)\n{\n return [{\n payload:String(msg.payload.targetValue)+\"000000000000000000000000000000\"}];\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1050,
"y": 400,
"wires": [
[
"196ce6f9.7f2059"
]
]
},
{
"id": "196ce6f9.7f2059",
"type": "ioBroker out",
"z": "e92f9430.a6cd58",
"name": "scene_data",
"topic": "tuya.0.bff049b02f35934de3pc6c.25",
"ack": "false",
"autoCreate": "false",
"stateName": "",
"role": "",
"payloadType": "",
"readonly": "",
"stateUnit": "",
"stateMin": "",
"stateMax": "",
"x": 1290,
"y": 400,
"wires": []
}
]
Schau mal ob es damit klappt.
Habe das Gerät und die Szene angepasst.