Closed Mariusthvdb closed 4 months ago
As title, the template-entity-row can not be set to inherit the new color schemes, see below for an example using the new binary-color which colors blue when on https://github.com/home-assistant/frontend/blob/3c8c1260b172cb2ef01328070e1c900b2cd3d4dc/src/resources/ha-style.ts#L145
in this case the top entity (unmodded, only needs state_color: true) the bottom speaks for itself, the active is also set, but it takes
state_color: true
paper-item-icon-active-color: gold from the theme I set before the new color schemes were introduced.
paper-item-icon-active-color: gold
- type: entities state_color: true entities: - binary_sensor.ha_dev_update_available - type: custom:template-entity-row entity: binary_sensor.ha_dev_update_available name: > {% if states[config.entity] is not none %} {{state_attr(config.entity,'friendly_name').split(': Update Available')[0]}} {% else %} Initializing {% endif %} state: > {% if states[config.entity] is not none %} {{iif(states(config.entity) == 'on','Update available','Up to date')}} {% else %} Waiting for state {% endif %} secondary: > {% if states[config.entity] is not none %} {% set id = states[config.entity].object_id.split('_update_available')[0] %} {% if states['sensor.' + id + '_newest_version'] is not none %} New: {{states('sensor.' + id + '_newest_version')}} - {% endif %}Current: {{states('sensor.' + id + '_version')}} {% else %} Initializing {% endif %} active: > {{is_state(config.entity,'on')}}
taking out paper color from the theme, leaves us with:
even though the more info is correctly showing the blue:
to be 100% certain it isnt an issue with the config.entity var, I also tried
active: > {{is_state('binary_sensor.ha_dev_update_available','on')}}
lastly, when taking out the full t-e-r config, and only leaving the auto-entities section
- type: custom:auto-entities card: type: entities title: Binaries update available card_mod: class: class-header-margin state_color: true show_empty: false filter: include: - entity_id: binary_sensor.*_update_available state: 'on' # options: # type: custom:template-entity-row # name: > # {% if states[config.entity] is not none %} # {{state_attr(config.entity,'friendly_name').split(': Update Available')[0]}} # {% else %} Initializing # {% endif %} # state: > # {% if states[config.entity] is not none %} # {{iif(states(config.entity) == 'on','Update available','Up to date')}} # {% else %} Waiting for state # {% endif %} # secondary: > # {% if states[config.entity] is not none %} # {% set id = states[config.entity].object_id.split('_update_available')[0] %} # {% if states['sensor.' + id + '_newest_version'] is not none %} # New: {{states('sensor.' + id + '_newest_version')}} - # {% endif %}Current: # {{states('sensor.' + id + '_version')}} # {% else %} Initializing # {% endif %} # active: > # {{is_state(config.entity,'on')}}
the blue is shown alright:
independent from the paper color. so it is the t-e-r preventing the inheritance of the new color scheme
btw, exchanging
# paper-item-icon-color: var(--primary-color) state-icon-color: '#636B75'
doesnt make a difference, in this case the state-icon-color is used, and still not the supposed binary color
As title, the template-entity-row can not be set to inherit the new color schemes, see below for an example using the new binary-color which colors blue when on https://github.com/home-assistant/frontend/blob/3c8c1260b172cb2ef01328070e1c900b2cd3d4dc/src/resources/ha-style.ts#L145
in this case the top entity (unmodded, only needs
state_color: true
) the bottom speaks for itself, the active is also set, but it takespaper-item-icon-active-color: gold
from the theme I set before the new color schemes were introduced.taking out paper color from the theme, leaves us with:
even though the more info is correctly showing the blue:
to be 100% certain it isnt an issue with the config.entity var, I also tried
lastly, when taking out the full t-e-r config, and only leaving the auto-entities section
the blue is shown alright:
independent from the paper color. so it is the t-e-r preventing the inheritance of the new color scheme
btw, exchanging
doesnt make a difference, in this case the state-icon-color is used, and still not the supposed binary color