Hello!
Is it possible to show devices with their IPs via this integration on a dashboard?
I have this sensor:
- sensor:
- name: "Network Device Status"
unique_id: network_device_status
state: "ok"
attributes:
devices: >
{% set status_list = {} %}
{% for device in states.device_tracker %}
{% set _ = status_list.update({device.entity_id: device.state}) %}
{% endfor %}
{{ status_list | to_json }}
- name: "Network Device IPs"
unique_id: network_device_ips
state: "ok"
attributes:
devices: >
{% set device_list = [] %}
{% for device in states.device_tracker if 'ip' in device.attributes %}
{% set device_list = device_list + [[ device.entity_id, device.attributes.ip ]] %}
{% endfor %}
{{ dict(device_list) | to_json }}
I am unable to create a working card code that shows all devices with IPs.
Thanks for sharing your thoughts!