Template to list all Z-Wave JS nodes, device info and related entities

I created a template that lists every zwave_js device node ID, friendly name, device name, manufacturer, model, firmware version and related entities (and state). Thanks to several others who posted related and helpful information.

I use it to:

  • Associate a node ID with its friendly name, device manufacturer and model number
  • Discover missing/disabled entities (e.g. node_status); enable the entity in device settings and it should then be listed
  • Find entities that are not consistently named
  • Understand the capabilities of a device (e.g. scenes, electric consumption)

The template retrieves all zwave_js devices and then uses HTML to create a tabular report. On a dashboard, create a view that is a panel (one card), add a new Markdown card and paste the template into the card. You can also insert it into the template tab under dev tools (but the HTML will not render). I’m not a Markdown or template expert and improvements (e.g. to improve formatting) are welcome.

{# get zwave_js devices #}
{% set ns = namespace(devices=[]) %}
{% set zwave_devices = integration_entities('zwave_js') | map('device_id') | unique | list %}
{% for zwave_device in zwave_devices -%}
  {% set node = (device_attr(zwave_device, 'identifiers') | first | last).split('-')[1] | int %}
  {% set name_by_user = device_attr(zwave_device, 'name_by_user') %} 
  {% set name = device_attr(zwave_device, 'name') -%} 
  {% set manufacturer = device_attr(zwave_device, 'manufacturer') %} 
  {% set model = device_attr(zwave_device, 'model') -%} 
  {% set sw_version = device_attr(zwave_device, 'sw_version') %} 
  {% set entities = device_entities(zwave_device) -%} 
  {# available but not used #} 
    {% set id = device_attr(zwave_device, 'id') -%}
    {% set via_device_id = device_attr(zwave_device, 'via_device_id') %} 
  {# add device info to ns.devices #}
  {% set ns.devices = ns.devices + [ {"node":node, "name_by_user":name_by_user, "name":name, "manufacturer":manufacturer, "model":model, "sw_version":sw_version, "entities":entities} ] %}
{% endfor %}

{# display zwave_js devices #}
<table>
<tr>
  <td align="center"><b><u>ID</b></u></td>
  <td><b><u>Friendly Name</u></b></td>
  <td><b><u>Device Name</u></b></td>
  <td><b><u>Manufacturer</u></b></td>
  <td><b><u>Model</u></b></td>
  <td><b><u>Firmware</u></b></td>
  <td><b><u>Entities (state)</u></b></td>
</tr>
{% for device in ns.devices | sort(attribute="node")  %}
  <tr valign="top"> 
    <td align="center"> {{ device["node"] }}: </td>
    <td> {{ device["name_by_user"] }} </td>
    <td> {{ device["name"] }} </td>
    <td> {{ device["manufacturer"] }} </td>
    <td> {{ device["model"] }} </td>
    <td> {{ device["sw_version"] }} </td>
    <td> 
      {%- for entity in device["entities"] %} {{ entity }} ({{ states(entity)}}) <br>
      {%- endfor %}
    </td>
{% endfor %}
</table>

An (unformatted) example of my node 9. The template renders each node on one line.

9:
Cam Power Living Room
Plug-In Appliance Module
Leviton
DZPA1
1.15
switch.cam_power_living_room (off)
update.cam_power_living_room_firmware (off)
sensor.cam_power_living_room_node_status (alive)
button.cam_power_living_room_ping (2022-09-07T19:45:48.835381+00:00)
sensor.cam_power_living_room_last_seen (2024-04-30T16:43:51+00:00)