Hi,
I’m trying to change icon for an input_number helper depending on a sensor state, but so far having no luck with it. I found good working solutions to do it for sensors, but struggling with input_number.
My current code doesn’t produce any icon at all, so wonder if somebody could either offer a solution or at least point me in the right direction. I’m new to homeassistant so don’t fully understand how it all works under the hood.
Ideally I’d like to do it in vanilla without using any card mods etc.
This is what I have at the moment in customize.yaml
input_number.newvol:
templates:
icon: |
{% if is_state("sensor.matt_audio_default_device_muted", "False") %}
mdi:volume-high
{% else %}
mdi:volume-mute
{% endif %}
any help will be greatly appreciated