按照n版所说:
{% set drive_id = "?" %}
{{ state_attr(drive_id, 'friendly_name') }}
将获得的id替换问号,应该就能获取friendly_name了
其它仔细看下面英文说明:
DEVICES
device_entities(device_id) returns a list of entities that are associated with a given device ID. Can also be used as a filter.
device_attr(device_or_entity_id, attr_name) returns the value of attr_name for the given device or entity ID. Not supported in limited templates.
is_device_attr(device_or_entity_id, attr_name, attr_value) returns whether the value of attr_name for the given device or entity ID matches attr_value. Not supported in limited templates.
device_id(entity_id) returns the device ID for a given entity ID or device name. Can also be used as a filter.