Hi
I have made myself an input_boolean that can be switched on / off to tell if I have taken my vitamins (lol, I know)
Together with that, I have made a template that show a thumbs up or down depending on the state of the input_boolean.
It looks like this:
But can I change the color of the thumb to green if it’s thumbs up and red if it’s thumbs down?
The template looks like this now:
- platform: template
sensors:
vitaminer_tatt:
friendly_name: "Tatt vitaminer i dag?"
value_template: >-
{% if is_state ('input_boolean.vitaminer_tatt', 'on') %}
Good job
{% elif is_state ('input_boolean.vitaminer_tatt', 'off') %}
Not so good job
{% endif %}
icon_template: >-
{% if is_state ('input_boolean.vitaminer_tatt', 'on') %}
mdi:thumb-up
{% elif is_state ('input_boolean.vitaminer_tatt', 'off') %}
mdi:thumb-down
{% endif %}
Thank you