Error Using Device Node in Node-Red with HA

I am deeeep down the rabbit hole here, in need of assistance. trying to get node red to call the LED effect device action on my inovelli blue switch. The action works from automations, but when node red does it it fails casing “Solid” (the effect type) to an int: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant -

Here’s an example automation action that works fine:

type: issue_all_led_effect
domain: zha
device_id: 2c43a32ccc1959fa988bec13a4bac529
effect_type: Solid
duration: 132
level: 1
color: 193

And here’s an export of the Node-Red device node:

[{"id":"f2dc6adddaa96121","type":"ha-device","z":"26754168a8757042","name":"Set Notification: Warning","server":"5801151d.9bdefc","version":0,"debugenabled":false,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"inputs":1,"deviceType":"action","device":"2c43a32ccc1959fa988bec13a4bac529","event":{"type":"issue_all_led_effect","domain":"zha","device_id":"2c43a32ccc1959fa988bec13a4bac529","metadata":{}},"capabilities":[{"name":"effect_type","type":"select","value":"Solid"},{"name":"color","type":"integer","value":193},{"name":"level","type":"integer","value":1},{"name":"duration","type":"integer","value":132}],"outputProperties":[],"x":710,"y":260,"wires":[["29d016e5ca3ae230","3939885f571d2626"]]},{"id":"5801151d.9bdefc","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":""}]

I can’t figure out where exactly the disconnect is – clearly somewhere has defined this as a string where it should be an int, or vice versa, but not sure if that’s in node-red companion, zigpy, or elsewhere. Here’s where the inovelli LED modes are defined, as far as I can tell: zha-device-handlers/ at dev · zigpy/zha-device-handlers · GitHub

1 Like

I’ve had a similar issue as well. I wonder if it’s related to the bug where if you try and run an action like an LED notifications on a blue switch in an automation solo it errors but if you run the full automation it works. Since I assume node red is using the same function that may be the issue. I’ve sadly swapped to HA automatons for just the LED function of my automations with the use of a button helper that I trigger in node red.

Would love a solution!

You can see someone running into this issue here in this thread and they talk about running the full automation vs the run task: