Created
February 20, 2023 20:35
-
-
Save suhlig/e49dc9e9b0a9398458abed436b427154 to your computer and use it in GitHub Desktop.
Dealing with attributes in HA templates
This file contains 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
{% set SENSOR = 'device_tracker.hexa' -%} | |
{{ SENSOR }} manufactured by {{ device_attr(SENSOR, 'manufacturer') }} | |
Attributes: | |
{% for attr in states[SENSOR].attributes -%} | |
- {{ attr }}: {{state_attr(SENSOR, attr)}} | |
{% endfor %} | |
hexa has {{ state_attr('device_tracker.hexa', 'AP SSID') }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment