custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.93k stars 233 forks source link

custom button card how to get device attributes #787

Open jmfargas opened 11 months ago

jmfargas commented 11 months ago

Is it possible to get the device attributes. I especially need to get the device name, since it is sometimes different from the entity name, for example for devices with several entities, like the shelly Pro 4PM. The method to get it is: device_attr('entity.entity_id', 'name') In addition it would be nice to be able to get the IP address of the device, which is done by doing: device_attr('entity.entity_id', 'configuration_url') Thank you very much.