Hello!
Trying to create a ha-entity switch in Node-RED so i get a switch in HA, do “something”
But, when i turn it on/off in HA, the “Test 2” is turning on/off in Node-RED, but nothing is happening on the output side. Is it not working like i think?
[
{
"id": "b4d8375b.b5fcc8",
"type": "ha-entity",
"z": "41611a22.1d20d4",
"name": "Test 2",
"server": "b0785337.16938",
"version": 1,
"debugenabled": false,
"outputs": 2,
"entityType": "switch",
"config": [
{
"property": "name",
"value": "Test 2"
},
{
"property": "device_class",
"value": ""
},
{
"property": "icon",
"value": ""
},
{
"property": "unit_of_measurement",
"value": ""
}
],
"state": "payload",
"stateType": "msg",
"attributes": [],
"resend": true,
"outputLocation": "",
"outputLocationType": "none",
"inputOverride": "allow",
"x": 310,
"y": 240,
"wires": [
[
"f1f99f6.3e7d56",
"90b9374c.dfa048",
"c6c2934f.0719d"
],
[
"f1f99f6.3e7d56",
"46be7046.9c128",
"cc562fbd.819c7"
]
],
"outputLabels": [
"on",
"off"
]
},
{
"id": "f1f99f6.3e7d56",
"type": "debug",
"z": "41611a22.1d20d4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 790,
"y": 220,
"wires": []
},
{
"id": "46be7046.9c128",
"type": "api-call-service",
"z": "41611a22.1d20d4",
"name": "",
"server": "b0785337.16938",
"version": 1,
"debugenabled": false,
"service_domain": "switch",
"service": "turn_off",
"entityId": "switch.telldus_pcskjerm",
"data": "",
"dataType": "json",
"mergecontext": "",
"output_location": "",
"output_location_type": "none",
"mustacheAltTags": false,
"x": 810,
"y": 280,
"wires": [
[]
]
},
{
"id": "90b9374c.dfa048",
"type": "api-call-service",
"z": "41611a22.1d20d4",
"name": "",
"server": "b0785337.16938",
"version": 1,
"debugenabled": false,
"service_domain": "switch",
"service": "turn_on",
"entityId": "switch.telldus_pcskjerm",
"data": "",
"dataType": "json",
"mergecontext": "",
"output_location": "",
"output_location_type": "none",
"mustacheAltTags": false,
"x": 790,
"y": 160,
"wires": [
[]
]
},
{
"id": "c6c2934f.0719d",
"type": "api-call-service",
"z": "41611a22.1d20d4",
"name": "",
"server": "b0785337.16938",
"version": 1,
"debugenabled": false,
"service_domain": "switch",
"service": "turn_on",
"entityId": "switch.telldus_pc",
"data": "",
"dataType": "json",
"mergecontext": "",
"output_location": "",
"output_location_type": "none",
"mustacheAltTags": false,
"x": 790,
"y": 100,
"wires": [
[]
]
},
{
"id": "cc562fbd.819c7",
"type": "api-call-service",
"z": "41611a22.1d20d4",
"name": "",
"server": "b0785337.16938",
"version": 1,
"debugenabled": false,
"service_domain": "switch",
"service": "turn_off",
"entityId": "switch.telldus_pc",
"data": "",
"dataType": "json",
"mergecontext": "",
"output_location": "",
"output_location_type": "none",
"mustacheAltTags": false,
"x": 810,
"y": 340,
"wires": [
[]
]
},
{
"id": "b0785337.16938",
"type": "server",
"z": "",
"name": "Home Assistant",
"legacy": false,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true
}
]
Fixed like this for now, this may be the correct way: