New group vs old group functionality in regards to zwave_js

Since the Group documentation recommends using the new group method instead of the old group method I tried to convert all my groups to the new method. I use the yaml method of creating groups instead of the UI. All the groups I moved from the old to new method worked well other than my Ring Keypad group. The following are my old and new Ring Keypad group definitions:

Old configuration in groups.yaml file:
ring_keypads:
  name: Ring Keypads
  icon: mdi:dialpad
  entities:
    - binary_sensor.ring_keypad_bedroom_hallway_ac_mains_re_connected
    - binary_sensor.ring_keypad_craft_room_ac_mains_re_connected
    - binary_sensor.ring_keypad_kitchen_ac_mains_re_connected

New configuration in groups_binary_sensor.yaml which I include from configuration.yaml using:
binary_sensor: !include groups_binary_sensor.yaml

  - platform: group
    name: Ring Keypads
    device_class: connectivity
    entities:
      - binary_sensor.ring_keypad_bedroom_hallway_ac_mains_re_connected
      - binary_sensor.ring_keypad_craft_room_ac_mains_re_connected
      - binary_sensor.ring_keypad_kitchen_ac_mains_re_connected

The entities are identical in both configurations but when I try to send something to the keypads using the new group configuration I get the error:

2025-04-22 13:52:22.651 WARNING (MainThread) [homeassistant.components.zwave_js.services] Entity binary_sensor.ring_keypads is not a valid zwave_js entity
2025-04-22 13:52:22.651 ERROR (MainThread) [homeassistant.components.automation.intrusion_nuisance_siren_timeout] Intrusion: Disarm response: Error executing script. Invalid data for call_service at pos 3: No zwave_js nodes found for given targets
2025-04-22 13:52:22.652 ERROR (MainThread) [homeassistant.components.automation.intrusion_nuisance_siren_timeout] Error while executing automation automation.intrusion_nuisance_siren_timeout: No zwave_js nodes found for given targets

So per the error HA is trying to send to the actual group name of binary_sensor.ring_keypads instead of sending it to the entities like when I use the old group method group.ring_keypads. The calling code is:

  action:
    - action: zwave_js.set_value
      target:
        entity_id: binary_sensor.ring_keypads
      data:
        command_class: '135'
        endpoint: '0'
        property: '10'
        property_key: '1'
        value: 1

So the above code causes the error and the keypads aren’t sent the data. But the identical code has been sending the code to each keypad when I use: group.ring_keypads instead of binary_sensor.ring_keypads for the entity_id.

As an FYI, when I query the status of the keypads using the new group definition it does know when the keypad entities go off/on. The problem is trying to send a code to the keypads.

Any ideas on why the new method doesn’t send the code to the group entities like the old method?

The Z-Wave integration actions expand group entities for you as a convenience, but it doesn’t know your binary_sensor is a group. You can try and see if the expand() template helper works with the new groups.

Old school groups had a ton of special functionality that is no longer being maintained.

Use the new school group and change your action to

    - action: zwave_js.set_value
      target:
        entity_id: "{{ state_attr('binary_sensor.ring_keypads', 'entity_id') }}"
      data:
        command_class: '135'
        endpoint: '0'
        property: '10'
        property_key: '1'
        value: 1

The other option is to use labels and forego the group all together.

1 Like

Labels aren’t supported in the Z-Wave platform actions. You would need to expand them manually with a template helper.

1 Like

interesting, that would be an easy PR

It was easy, and it was rejected.

Link?

Ah ok, not against the change, against a change that doesn’t hit everything. Makes sense. Wonder if that arch discussion was ever created

Yep, the reasoning makes sense, unfortunately.

1 Like

Thank you for the response. When I tried “{{ expand(‘binary_sensor.ring_keypads’)” I got the errors:

2025-04-22 15:08:36.486 ERROR (MainThread) [homeassistant.components.automation.intrusion_pre_trigger_warning_4] Stop audible notification and tell Ring Keypads that the system is Armed Home: Error executing script. Error for call_service at pos 1: Template rendered invalid entity IDs: [<template TemplateState(<state binary_sensor.ring_keypad_kitchen_ac_mains_re_connected=on; device_class=plug, friendly_name=Ring Keypad Kitchen AC mains re-connected @ 2025-04-22T13:27:04.966072-04:00>)>, <template TemplateState(<state binary_sensor.ring_keypad_craft_room_ac_mains_re_connected=on; device_class=plug, friendly_name=Ring Keypad Craft Room AC mains re-connected @ 2025-04-22T13:27:04.791849-04:00>)>, <template TemplateState(<state binary_sensor.ring_keypad_bedroom_hallway_ac_mains_re_connected=on; device_class=plug, friendly_name=Ring Keypad Bedroom Hallway AC mains re-connected @ 2025-04-22T14:37:57.220325-04:00>)>]
2025-04-22 15:08:36.487 ERROR (MainThread) [homeassistant.components.automation.intrusion_pre_trigger_warning_4] Error while executing automation automation.intrusion_pre_trigger_warning_4: Template rendered invalid entity IDs: [<template TemplateState(<state binary_sensor.ring_keypad_kitchen_ac_mains_re_connected=on; device_class=plug, friendly_name=Ring Keypad Kitchen AC mains re-connected @ 2025-04-22T13:27:04.966072-04:00>)>, <template TemplateState(<state binary_sensor.ring_keypad_craft_room_ac_mains_re_connected=on; device_class=plug, friendly_name=Ring Keypad Craft Room AC mains re-connected @ 2025-04-22T13:27:04.791849-04:00>)>, <template TemplateState(<state binary_sensor.ring_keypad_bedroom_hallway_ac_mains_re_connected=on; device_class=plug, friendly_name=Ring Keypad Bedroom Hallway AC mains re-connected @ 2025-04-22T14:37:57.220325-04:00>)>]

So it did expand them but didn’t like it. Although, maybe I did the expand incorrectly. It did like @petro idea and I’ll reply to their post below and I’ll use that method unless there is a reason I shouldn’t use it.

You shouldn’t use expand.

Thank you for the reply. Your method worked perfectly and thanks for the info about old school functionality. I’ll mark your reply as my solution.
Thank you again!

If you want to use expand, the template would be

{{ 'binary_sensor.ring_keypads' | expand | map('entity_id') | list }}

but I recommend the other template

1 Like

Ah OK, thank you for the proper expand statement. As you said I’ll use your solution since it sounds like it’s the better option!