card-mod with multiple-entity-row
See original GitHub issueMy Home Assistant version: 0.117.5
My lovelace configuration method (GUI or yaml): GUI
What I am doing:
Hy, i would to color the entities based on a status in a multiple-entity-row entity. Is possible? I try to use CARD-mod but seams that is not compatible with multiple-entity-row. My situation is this: but not work.
can you help me?
What I expected to happen:
color the text depending of the value
What happened instead:
nothing. The text remain with the base black color.
Minimal steps to reproduce:
card:
title: Volumetric
type: entities
entities:
- entity: light.volumetrico_ufficio
icon: 'mdi:signal'
type: 'custom:multiple-entity-row'
secondary_info: last-changed
toggle: true
state_color: true
entities:
- entity: sensor.volumetrico_ufficio_status
name: false
style: |
ha-card {
color: {% if is_state('sensor.volumetrico_ufficio_status', 'NORMAL')
%} green {% else %} red {% endif %};
}
Error messages from the browser console:
nothing error message
By putting an X in the boxes ([ ]) below, I indicate that I:
-
[X ] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
-
[X ] Have made sure I am using the latest version of the plugin.
-
[X ] Have followed the troubleshooting steps of the “Common Problems” section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
-
[X ] Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top GitHub Comments
@KTibow Thank you for all the help! I finally understand how this works and was able to not only make this example work, but also styled several other cards using the same method. This was the key hint you gave me:
I constantly got this wrong. The above hint made me realize that my “root” element is the entity card.
For anyone else arriving here and wondering, this is the final yaml that actually works as expected:
Thank you again for sticking with me on this!!!
I struggled with this snag for several hours. With your help, everything worked out. Thank you.