I just started with configuring Home Assistant and tried to integrate sensors that include information from json output for the fuel prices of gas stations. The entities work and I can see that the attributes are available in the entities list.
I created a dashboard card and tried to fill in the name of the gas station via a template.
When I test the template with the Template Editor, I receive the correct result:
Unfortunately it doesn’t work on the dashboard card:
Here is my code:
type: entities
title: null
entities:
- entity: sensor.benzinpreis_tankstelle1
icon: mdi:gas-station-outline
name: '{{ state_attr(''sensor.benzinpreis_tankstelle1'', ''name'') }}'
secondary_info: last-updated
show_header_toggle: false
Result:
It seems to be a syntax problem but I spent several hours of searching the web for help and wasn’t able to fix it.