antamy
December 21, 2024, 6:57pm
1
Is there a simple syntax I can use to get the device name for an entity? I have devices installed via an integration and each device has a number of sensor entities. I want to display one of these sensors in a list with the value of the sensor and the name of the device it belongs to.
{{device_attr(your_entity_id, 'name')}}
Building Templates docs - Devices
Sir_Goodenough
((SG) WhatAreWeFixing.Today)
December 21, 2024, 7:16pm
3
Hello Profile - antamy - Home Assistant Community ,
device_entities(device_id) returns a list of entities that are associated with a given device ID. Can also be used as a filter.
Templating - Home Assistant .
Found with an easy search.
Sometimes searching for what you want to find here in the Community Forum can be frustrating. The Forums base software (Discourse) has a search tool that is somewhat effective, but it relies on only the answers provided by other users in the app to answer your question. It does do a good job of popping up similar topics when you are starting a new topic however. (So please pay close attention to the side panel when you are adding a new topic)
If you use a search engine like DuckDuckGo or Googl…
antamy
December 21, 2024, 9:12pm
4
Thanks. I was searching everywhere for entities, I didn’t expect this to be under devices.
antamy
December 21, 2024, 9:13pm
5
great, except that’s not what I was looking for.