Created
March 16, 2026 14:16
-
-
Save qguv/ecb58153c65ff7ec3735a9c91d9a3d43 to your computer and use it in GitHub Desktop.
Home Assistant: list device properties of every device
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {# | |
| List device properties of every device | |
| Run on the Home Assistant developer tools template page: | |
| http://homeassistant.local:8123/config/developer-tools/template | |
| Device property list: | |
| https://developers.home-assistant.io/docs/device_registry_index/#device-properties | |
| #} | |
| {# set query scope (remove the brackets to query all devices) #} | |
| {% set domain = states["light"] %} | |
| {% | |
| set device_props = [ | |
| "area_id", | |
| "config_entries", | |
| "configuration_url", | |
| "connections", | |
| "default_manufacturer", | |
| "default_model", | |
| "default_name", | |
| "entry_type", | |
| "hw_version", | |
| "id", | |
| "identifiers", | |
| "name", | |
| "name_by_user", | |
| "manufacturer", | |
| "model", | |
| "model_id", | |
| "serial_number", | |
| "sw_version", | |
| "via_device", | |
| ] | |
| %} | |
| {% | |
| for device_id in ( | |
| set( | |
| domain | |
| | map(attribute='entity_id') | |
| | map('device_id') | |
| | reject('none') | |
| ) | |
| | map('device_attr','id') | |
| | list | |
| ) | |
| -%} | |
| {% | |
| set device_name = ( | |
| device_attr(device_id, "name_by_user") | |
| | default(device_attr(device_id, "name"), true) | |
| | default("None", true) | |
| ) | |
| %} | |
| {% set separator = '-' * (device_name | length) %} | |
| {{separator}} | |
| {{device_name}} | |
| {{separator}} | |
| {%- for j in device_props -%} | |
| {% if device_attr(device_id, j) is not none %} | |
| {{ j }}: {{ device_attr(device_id, j) }} | |
| {%- endif -%} | |
| {% endfor -%} | |
| {% endfor -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment