Wesley2004
(Wesley Van Doren)
1
i found some code for changing the color and icon for a input boolean.
but it didn’t work here.
input_boolean.verwarmen_mag:
templates:
icon: >
if [state === 'on'] return 'mdi:radiator';
return 'mdi:radiator-disabled';
icon_color: >
if [state === 'on'] return 'rgb[251, 0, 0]';
return 'rgb[54, 95, 140]';
who knows a solution to make this work?
km4lin
2
Same here, it doesn’t work
Wesley2004
(Wesley Van Doren)
3
Nope, still didnt find solution!
km4lin
4
After solution from @Mariusthvdb it needs Custom UI to work.
and some other formatting… please check the examples I’ve given in the other thread:
homeassistant:
customize:
input_boolean.notify_motion:
templates:
icon: >
if (state === 'on') return 'mdi:run-fast';
return 'mdi:eye-off';
icon_color: >
if (state === 'on') return 'rgb(251, 210, 41)';
return 'rgb(54, 95, 140)';
Wesley2004
(Wesley Van Doren)
6
Ok i am not at home now for 2 weeks. If i come back i will try this.
Hope it works