|
Moved from #510 @Mariusthvdb btw, talking UIX styling in more-info coming from a themed entity... ( I know, over the top, but lets not go there now)
its more info would also apply that....
that is what my ancient custom-ui does, (well, it sets an actual attribute icon_color to the entity, and applies that everywhere the entity lives, including the more-info), and it is the last thing I miss in styling our Dahsboards. @dcapslock if that would be something you could think to be possible, Id gladly open a FR for that. and forgive the toggle. haha |
Replies: 2 comments 14 replies
|
This is already possible. See example below. You would adjust the uix-more-info-yaml: |
ha-more-info-info $$ state-info $: |
state-badge {
{% set entity = config.entityId if 'entityId' in config else None %}
{% if entity == 'sensor.sydney_olympic_park_temp' %}
--icon-primary-color:
{% set state = states(entity)|int(-5) %}
{% if state == 'unknown'%} gray
{% elif state < 5 %} dodgerblue
{% elif state < 10 %} lightblue
{% elif state < 15 %} turquoise
{% elif state < 20 %} green
{% elif state < 25 %} darkgreen
{% elif state < 30 %} orange
{% elif state < 35 %} crimson
{% else %} firebrick
{% endif %};
{% endif %}
} |
|
Another possible FR would be to implement |


Available in 8.1.0-beta.1