#looking for the device_attribute indicating device: ready

1 messages · Page 1 of 1 (latest)

terse dirge
#

my Zwave page shows 2 devices arent ready, but I cant find both of them... so, id like to template my table to include that attribute in a column for easy identification, but dont know if that is actually a device_attribute at all.

using this now

          {%- set ns = namespace(nodes=[]) %}
          {%- for dev_id in integration_entities('zwave_js')|map('device_id')|unique %}
            {%- set node_id = (device_attr(dev_id,'identifiers')|first|last).split('-')[1] %}
            {%- set ns.nodes = ns.nodes + [(node_id|int,dev_id)] %}
          {%- endfor %}

          <table>
            <thead>
              <tr>
                <th>ID</th>
                <th>Manufacturer</th>
                <th>Product</th>
                <th>Product&nbsp;code</th>
                <th>Name by user</th>
                <th>Location / Area</th>
                <th>FW</th>
                <th>Status</th>
              </tr>
            </thead>
            <tbody>
            {%- for node_id,dev_id in ns.nodes|sort(attribute='0') %}
              <tr>
                <td style="border: none;">
                  <a href="/config/devices/device/{{ dev_id }}"><b>{{ "%01d"|format(node_id) }}</b></a>
                </td>
                <td>{{ device_attr(dev_id,'manufacturer') }}</td>
                <td>{{ device_attr(dev_id,'name') }}</td>
                <td>{{ device_attr(dev_id,'model') }}</td>
                <td>{{ device_attr(dev_id,'name_by_user') or '' }}</td>
                <td>{{ area_name(dev_id) or '' }}</td>
                <td>{{ device_attr(dev_id,'sw_version') }}</td>
                <td>
                  {{ device_entities(dev_id)
                      |select('search','status')
                      |map('states')
                      |join }}
                </td>
              </tr>
            {%- endfor %}
#

btw, those (2 not klaar) should really be clickable..... Maybe we need add a FR to do so?

timid current
#

Can't hurt to make a feature request

terse dirge
#

Will do 😉 can you help me with the device_attr? Or isn’t it available at all in our current templating tools

timid current
#

No clue. I'm a noob when it comes to actually using HA