Hi all,
I have been reaserching everywhere but i just can't find where i'm going wrong, i'm trying to add a ha-icon to my card and changing its state depending if home or not.
This is the code im using,
custom_fields:
location:
[[[
if (states["person.name"].state == "home")
return '<ha-icon
icon="mdi:home"
style="width: 22px; height: 22px;"
</ha-icon>'
else
return '<ha-icon
icon=mdi: home-export-outline"
style="width:22px; height:22px;"
</ha-icon>'