Closed ildar170975 closed 1 year ago
The config.entity variable is supported for defining values for name, icon etc:
config.entity
name
icon
- type: custom:template-entity-row entity: input_boolean.test_boolean state: >- {{states(config.entity)}}
but does not work inside card-mod - we have to use an entity_id explicitly:
entity_id
type: entities entities: - entity: input_boolean.test_boolean - type: custom:template-entity-row entity: input_boolean.test_boolean state: state card_mod: style: div#wrapper: | .state { color: magenta; } - type: custom:template-entity-row entity: input_boolean.test_boolean state: state card_mod: style: div#wrapper: | .state { {% if is_state('input_boolean.test_boolean','on') %} color: magenta; {% else %} color: cyan; {% endif %} } - type: custom:template-entity-row entity: input_boolean.test_boolean state: state card_mod: style: div#wrapper: | .state { {% if is_state('config.entity','on') %} color: magenta; {% else %} color: cyan; {% endif %} }
My bad. config.entity must be used w/o '. Sorry!
'
The
config.entity
variable is supported for defining values forname
,icon
etc:but does not work inside card-mod - we have to use an
entity_id
explicitly: