-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coloured states not possible? #209
Comments
You are trying to use jinja templates where they are not supported. |
Hi, |
@kamcioo I've been trying to do nearly the same thing as you've been trying to do. @ildar170975 is right:
Note that this will change the icon color based on the state. From your original post, it's unclear to me whether you are trying to change the icon color or the color of some other UI element. Also note that you can use the name of a color, or you can use an RGB code like: You can also use the default color lovelace uses when a device is in the off state by using: |
If styling of secondary items is required: |
I would like to colour the states but I try and try and nothing work:
`type: entities
entities:
type: custom:multiple-entity-row
name: Außen
secondary_info: last-changed
show_state: false
entities:
type: custom:multiple-entity-row
name: Flur unten
secondary_info: last-changed
show_state: false
entities:
styles:
color: red
styles: >-
{% if states('sensor.wandthermostat_humidity_2') >= '70' %} color: red
{% elif states('sensor.wandthermostat_humidity_2') >= '60' %} color:
orange {% else %} color: green {% endif %}
`
with styles, color it works but when I use if & else, it don’t work any more? Do I do something wrong or it isn’t possible to colour the states?
Thank You in advance,
kamil
The text was updated successfully, but these errors were encountered: