Hi.
Simple thing but not working for me and I totally don’t know why.
I have a list of devices from device tracker component and I want to set device eniity color to red if this device is away. I tried almost everything but without luck.
Here is my code:
frontend:
javascript_version: latest
extra_html_url:
- /local/custom_ui/state-card-custom-ui.html
extra_html_url_es5:
- /local/custom_ui/state-card-custom-ui-es5.html
themes:
red:
primary-color: red
homeassistant:
customize:
...
sensor.wiu_l__iot_domito:
templates:
theme: >
if (state === 'online') return 'red'; else return null;
What I missed?
EDIT:
I dug and dug and finally got it!
instead of using:
primary-color: red
I should use:
paper-item-icon-color: red # for icon
primary-text-color: red # for first line of text