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
498 stars 93 forks source link

Fields disappear (Call Service node) #1600

Closed ndoggac closed 3 weeks ago

ndoggac commented 3 weeks ago

Describe the bug

When using Call Service node (now called action node) with domain switch the fields area, device and entity disappears when using services toggle or turn_off, or any action from the dropdown.

Even old flows are affected. Nodes known to have device entries in them are now missing.

Running 0.73.0 with latest home assistant everything.

To Reproduce

create a new "call service" node. Entries for area, device, and entity exist.

Change Domain to "zwave_js", all three entries still exist.

Change Service to "multicast_set_value" and the entries for area & device disappear. Entity remains.

....

Edit old nodes that you know have things referenced by device name, realize the device entry area does not show up.

Expected behavior

I expect the fields stated above not to disappear.

Screenshots

No response

Example Flow

No response

Environment Information

Nothing shown in window.

Additional context

Issues mistakenly posted in the add-on repository.

https://github.com/hassio-addons/addon-node-red/issues/1953 https://github.com/hassio-addons/addon-node-red/issues/1922

zachowj commented 3 weeks ago

Are you accessing the Node-RED UI via an iframe within Home Assistant? If so, try connecting directly to the Node-RED UI on port 1880 to check if the issue persists.

ndoggac commented 3 weeks ago

Tried in HASSOS via addon with dark theme on both HASS & NodeRed, same behavior. Tried with default themes on both HASS & NR, same behavior. Tried in separate browser (Chrome) window with direct login, same behavior. Tried in Firefox, Edge, Brave. same behavior.

Area & Device fields disappear when you select certain options in the "Action" field dropdown. Even editing legacy nodes where I know that devices were leveraged, they are missing. Creating a new "action" node and the behavior is the same.

nr

zachowj commented 3 weeks ago

For the zwave_js.multicast_set_value action, the area_id, device_id, and entity_id should be placed under the data property, not within the target section. That's why the target section doesn't appear for this action.

You can refer to the documentation here:
https://www.home-assistant.io/integrations/zwave_js/#action-zwave_jsmulticast_set_value

This change was introduced in version 0.66.0, as the properties were previously handled incorrectly. The update aligns the schema with Home Assistant’s behavior. If you build the same action in Home Assistant and switch to YAML mode, you'll see that these properties are correctly placed under the data property.

In version 0.66.0, actions with entity IDs incorrectly placed in target.entity_id instead of data.entity_id will now throw errors.

ndoggac commented 3 weeks ago

zachowj thanks for the heads up. I had missed the documentation/listing of the breaking changes. that's a lot nodes affected for me. consider this closed, thanks for fast responses.