iantrich / config-template-card

📝 Templatable Lovelace Configurations
MIT License
434 stars 56 forks source link

device_id in variable? #77

Closed brandondb1 closed 2 years ago

brandondb1 commented 3 years ago

Hi, thanks for your work on this card. I'm trying to get the device_id into a variable, and wondering if you can shed some light on the construction. In jinja it's:

{{ device_id('light.dining_room') }}

I've tried: device_id[''light.dining_room''] device_ids[''light.dining_room''].device_id and a few other things but no luck....

Thanks in advance!

(ultimately what I'm trying to do is have a long-press link on an entity that goes to the device page, rather than having to follow through more-info>settings>related>Device)

iantrich commented 2 years ago

That's provided by the backend and not readily available on the frontend.