List all HA devices with mac address

Hi!

There is any way to list all the devices or entities with their mac addresses?
I try to identify a device from my network.
If I could know a list similar to this:
Sonoff Device - MAC xx:xx:xx:xx:xx:xx

At least I could know what type of deice is what I search for, then I can search deeper from the specific integration…

Thanks

If someone needs this

{% set devices = states | map(attribute='entity_id') %}
{% for device in devices %}
{% set bun = device_attr(device, 'connections') %}
{% if bun is not none and 'mac' in bun | map(attribute='0') | list %}
{% for connection in bun %}
{% if connection[0] == 'mac' %}
{{ device }} - {{ connection[0] }} - {{ connection[1] }}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}

Or, for specific device only

{{ (device_attr(device_id('media_player.computer_tablet'),'connections') | list)[0][1] }}

1 Like