Closed lennon101 closed 2 months ago
More info:
If I indent the template under icon then the error goes away but the icon does not change color:
templates:
- name: test_template
template:
show_icon: true
state_color: true
icon:
template:
styles: |
if (entity.state == 'on') return 'color: yellow';
Please check the state value. Because it gets parsed to javascript I'm sure it's a different value or a typo.
It is not. It is "on". I have checked. Please reopen this issue. And please don't consider it closed until we have confirmed it fixed.
Closing the issue so abruptly does not promote community engagement or support in my opinion
Why arent you using : https://github.com/marcokreeft87/room-card/wiki/Configuration#icon-conditions ?
@lennon101 Why did you request removal of this card from hacs? It works fine and has received updates when necessary. I'm sorry if you had a bad experience with it but why spoil the fun for everyone else too?
@ludeeus Please reconsider the removal of this card!
Which version of Room Card?
1.08.04
Describe the bug
When trying to use the templates as described in the wiki, an error appears in the preview window:
To Reproduce n/a
Expected behavior
After adding the template code as provided by the wiki, I would expect the icon to turn yellow when the entities state is 'on'
Screenshots
Desktop (please complete the following information):
Additional context
Without templating, the icon turns yellow without any issues (just using the normal styles method per entity).
YAML