zachowj / node-red-contrib-home-assistant-websocket

Node-RED integration with Home Assistant
https://zachowj.github.io/node-red-contrib-home-assistant-websocket/
MIT License
481 stars 85 forks source link

not a valid value for dictionary value @ data['entity_id']. Got None #1045

Open lublak opened 10 months ago

lublak commented 10 months ago

Describe the bug

If I try to trigger a action using the device node I get an error: not a valid value for dictionary value @ data['entity_id']. Got None

To Reproduce

Create a simple flow: IMG_0193 IMG_0194

Expected behavior

Should not throw an error

Screenshots

See to reproduce

Example Flow

[{"id":"63cbdfe69644d91e","type":"ha-device","z":"ea82b441f55b2fcf","name":"","server":"fea6860f.124988","version":0,"debugenabled":false,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"inputs":1,"deviceType":"action","device":"585fc77acabe0678f80d510d3988795d","event":{"device_id":"585fc77acabe0678f80d510d3988795d","domain":"select","entity_id":"0eee6b53b082e932123c2ce96ff75481","type":"select_option","metadata":{"secondary":true}},"capabilities":[{"name":"option","type":"select","value":"On"}],"outputProperties":[],"x":610,"y":620,"wires":[[]]},{"id":"fea6860f.124988","type":"server","name":"Home Assistant","addon":true}]

This package's version (not the Home Assistant add-on version)

2.2.0

Is Node-RED running in Docker?

Home Assistant add-on

Node-RED version

14.4.5

Node.js version

?

Additional context

No response

VIMVa commented 10 months ago

Same here on all previously created and new HA Action Device nodes except if starting with a State Node just before the Device node.

Amadudl commented 9 months ago

image image image

Same problems here. It looks like Node-Red is trying to use the name field for the device ID.

AllStarzes commented 9 months ago

Same problemes here. If i update existing nodes, i get the same issue. Is there a solution for this problem or have anyone solved the problem?

Best Regards Ben

VIMVa commented 9 months ago

I have replaced all 'Device' nodes in my NodeRed flows with 'Call Service' nodes as nothing is moving since the start of this thread. That works for me at least.

jonaslewin commented 9 months ago

I have also replaced 'Device' with 'Call Service'. I no longer need node-red-contrib-home-assistant-websocket. How can I remove it from HA/HACS?

Den fre 6 okt. 2023 kl 11:48 skrev VIMVa @.***>:

I have replaced all 'Device' nodes in my NodeRed flows with 'Call Service' nodes as nothing is moving since the start of this thread. That works for me at least.

— Reply to this email directly, view it on GitHub https://github.com/zachowj/node-red-contrib-home-assistant-websocket/issues/1045#issuecomment-1750307373, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYTQIOVQOCMH5FFJ2BD3GLX57HX3AVCNFSM6AAAAAA4JI3VQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQGMYDOMZXGM . You are receiving this because you are subscribed to this thread.Message ID: <zachowj/node-red-contrib-home-assistant-websocket/issues/1045/1750307373@ github.com>

AllStarzes commented 9 months ago

Update: After the Update for 15minutes is the problem the same but now here my workaoround for my problem for home and away:

Use the call Service - select - select_Option - entity:select.homebase2_guard_mode - Data: {"Option" :"Home"}

I hope it helps someone


Yes i saw this workaound but You cant call the Service "armed_home" and "armed_away" on the Homebase von eufy. Only my 3 custom armed, if i call one of them IT works but You dont See IT active in the eufy App as active. I hope u know hat i mean 🤣🤣

VIMVa commented 9 months ago

@jonaslewin In HACS, select NodeRed Companion, then 3 dots top-right to see remove. Is it that what you are looking for?

jonaslewin commented 9 months ago

Thank you for the uninstall/removal explanation.

Den fre 6 okt. 2023 kl 14:04 skrev VIMVa @.***>:

@jonaslewin https://github.com/jonaslewin In HACS, select NodeRed Companion, then 3 dots top-right to see remove. Is it that what you are looking for?

— Reply to this email directly, view it on GitHub https://github.com/zachowj/node-red-contrib-home-assistant-websocket/issues/1045#issuecomment-1750526943, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYTQIIQ2UH3YW6OSRVMODDX57XWRAVCNFSM6AAAAAA4JI3VQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJQGUZDMOJUGM . You are receiving this because you were mentioned.Message ID: <zachowj/node-red-contrib-home-assistant-websocket/issues/1045/1750526943@ github.com>

mitch569 commented 9 months ago

Also having the same issue, rolling back this update for now :)

robsch94 commented 8 months ago

From looking at the JSON of a flow, the thing, that seems to have changed is the entity_id format in the event under device action. In older flows, that are still working, this entity_id is a human-readable string, in my case for example "light.living_room". In newer flows, this ID is an hex string. I was not able to find out, where this hex ID is coming from so far. When exporting a flow as JSON, changing the entity_id back to the human-readable string, and re-importing the flow, everything works fine.

chrisroxor commented 8 months ago

I'm also getting this issue. Did anyone have success with rolling back? And to which version?

gbraux commented 7 months ago

Same issue here ... Can someone have a look ? ;-)

AllStarzes commented 7 months ago

Same issue here ... Can someone have a look ? ;-)

Dont usw the beta nodes. User the call Service. I replace All my nodes with the call Service und works fine.

https://github.com/zachowj/node-red-contrib-home-assistant-websocket/issues/1045#issuecomment-1750523425

gbraux commented 7 months ago

Thx @AllStarzes. Service is definitely working, thx for the tip. BTW, fun that my old nodes (create somethink like 1y ago) are still working ... The issue is only for newly created nodes ...

AllStarzes commented 7 months ago

Thx @AllStarzes. Service is definitely working, thx for the tip. BTW, fun that my old nodes (create somethink like 1y ago) are still working ... The issue is only for newly created nodes ...

U welcome. Yes this is the know issue, If u create a New node. I would replace All these nodes. I also did that. Regards 👋

VIMVa commented 7 months ago

Thx @AllStarzes. Service is definitely working, thx for the tip. BTW, fun that my old nodes (create somethink like 1y ago) are still working ... The issue is only for newly created nodes ...

Who's tip? 😉

VIMVa commented 3 months ago

So sad that since September '23 nothing has changed yet 😭

AllStarzes commented 3 months ago

So sad that since September '23 nothing has changed yet 😭

Hi, Use the call Service. Dont usw the beta (Red) Services. Works fine and u can all replace IT with the normal Call Services

VIMVa commented 3 months ago

So sad that since September '23 nothing has changed yet 😭

Hi, Use the call Service. Dont usw the beta (Red) Services. Works fine and u can all replace IT with the normal Call Services

Thanks for repeating my own suggestion of October 6, 2023 above 😊 for a workaround that needs us to review and modify all our flows where we used that nice node. With all respect: believe we do not ask too much for things to work as they are meant to work, especially when we feedback their errors popping up in a new beta release and while numerous NodeRed releases have appeared since then.