Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Zmień kolor wartości lub tekstu i wartości na podstawie wartości stanu
- kod:
- type: entities
- entities:
- - entity: sensor.licznik_1_power
- card_mod:
- style:
- hui-generic-entity-row:
- $: |
- .text-content:not(.info) {
- color:
- {% if states(config.entity) | int <= 200 %}
- #e1e1e1
- {% elif states(config.entity) | int <= 400 %}
- greenyellow
- {% elif states(config.entity) | int <= 800 %}
- yellow
- {% elif states(config.entity) | int > 801 %}
- red
- {% endif %}
- ;
- }
- - entity: sensor.licznik_1_power
- card_mod:
- style: |
- :host {
- color:
- {% if states(config.entity) | int <= 200 %}
- #e1e1e1
- {% elif states(config.entity) | int <= 400 %}
- greenyellow
- {% elif states(config.entity) | int <= 800 %}
- yellow
- {% elif states(config.entity) | int > 801 %}
- red
- {% endif %}
- ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement