Closed arifroni closed 1 year ago
Try this...
light_switch:
double_tap_action:
action: fire-dom-event
browser_mod:
service: browser_mod.popup
data:
title: >
[[[
return states[variables.real_light_entity] ? states[variables.real_light_entity].attributes.friendly_name : "Unknown";
]]]
This is a helpful site... https://www.w3schools.com/jsref/jsref_operators.asp
I want to pass an entity name via a variable for the template. And use that variable in template. How can I do that?
For example: my card
In the following template title is the friendly name of the entity (switch.eh_kitchen_sw_switch). But I want to use the friendly name of the variable (light.diningroom). How do I write that? template: