Closed ildar170975 closed 8 months ago
Example for fold-entity-row
.
This code used to change value's color.
type: entities
entities:
- type: custom:fold-entity-row
card_mod:
style:
hui-text-entity-row:
$:
hui-generic-entity-row: |
.text-content.pointer {
color: red;
}
'#items':
hui-text-entity-row:
$:
hui-generic-entity-row: |
.text-content.pointer {
color: red;
}
head:
entity: sun.sun
name: common color
padding: 15
open: true
entities:
- entity: sun.sun
name: common color
- entity: sun.sun
name: common color
Is there a workaround for this? I am using decluttering card and template as well and it's disappeared. It's the one you helped me with a long time ago and now it's blank.
Hi David, DM me about this card, will see if I can help
Solved the problem at least for restriction-card
:
- type: entities
entities:
- type: custom:restriction-card
row: true
card:
entity: sun.sun
name: hui-simple-entity-row
secondary_info: last-changed
card_mod:
style:
hui-simple-entity-row $:
hui-generic-entity-row $: |
.text-content:not(.info) {
color: magenta;
}
Gonna check it for config-template-card
& fold-entity-row
then.
Solved for fold-entity-row
(case described here):
- type: entities
entities:
- type: custom:fold-entity-row
card_mod:
style:
div#head :first-child:
$ hui-generic-entity-row $: |
.info {
color: red;
}
div#items :first-child:
$ hui-generic-entity-row $: |
.info {
color: cyan;
}
head:
entity: sun.sun
padding: 15
open: true
entities:
- entity: sun.sun
name: common color
- entity: zone.home
name: common color
- entity: sensor.processor_use
card_mod:
style:
hui-generic-entity-row $: |
.info {
color: magenta !important;
}
- entity: input_boolean.test_boolean
name: common color
So, currently cannot solve the 1st case with config-template-card
(here)
Closing the issue.
The example from the 1st post with config-template-card
works:
type: entities
title: config-template (row)
entities:
- type: custom:config-template-card
entities:
- sun.sun
row:
entity: sun.sun
name: config-template
card_mod:
style: |
:host {
color: red;
}
- type: custom:config-template-card
entities:
- sun.sun
row:
entity: sun.sun
name: config-template
card_mod:
style:
div#card :first-child $ hui-generic-entity-row $: |
.info {
color: orange;
}
My Home Assistant version: 2020.10.6
My lovelace configuration method (GUI or yaml): GUI, yaml
What I am doing: Trying to apply a style to a row (Entities card) with:
config-template-card
restriction-card
fold-entity-row
.What I expected to happen: Styles are applied. Earlier it worked:
config-template-card
- https://community.home-assistant.io/t/card-mod-add-css-styles-to-any-lovelace-card/120744/1328restriction-card
- no examplefold-entity-row
- https://community.home-assistant.io/t/card-mod-add-css-styles-to-any-lovelace-card/120744/1192What happened instead: No styles applied.
Minimal steps to reproduce - for
config-template-card
:Error messages from the browser console: none
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.