Closed Tom-ahawk closed 1 year ago
Try smth like this:
secondary_info: >-
[[ if(input_boolean.test_boolean.state == "on","Cost ",
"") ]]
[[ if(input_boolean.test_boolean.state == "on",zone.home.state,
"") ]]
[[ if(input_boolean.test_boolean.state == "on"," Kr/kWh",
"") ]]
Could be cumbersome - but seems to be only solution...
In SOME cases it is better to use a custom:template-entity-row
- it supports jinja. Update: OMG, I forgot that this card does support jinja too))) - see below.
Suggest to ask similar questions in the dedicated Community thread (https://community.home-assistant.io/t/custom-secondary-info-for-entities-card/82551) and leave Github for reporting bugs & proposing FRs.
3) Will do
- but not when text combined with state:
Exactly. These seem to be unsupported:
"LOOK AT" zone.home.state "TOT",
"LOOK AT" + zone.home.state + "TOT",
Or you may use jinja )))
secondary_info: >-
{% if is_state('input_boolean.test_boolean','on') -%}
Cost {{states('zone.home')}} Kr/kWh
{%- endif %}
Perfect 👍🏻
Not an issue, but I am struggling with the syntax. How do I use a sensor state into an if-result like:
Please advise.