hi, im using a custom button card to display the temperature and hopefully able to change icon color pending the temperature in the room, its not working and im not totally sure why…also would like it to be blue if under 20, green if 20-24 and red if over 25, any help would be appreciated.
here is my current code
type: custom:button-card
aspect_ratio: 1.2/1
color: green
color_type: icon
entity: sensor.lr_weather_temperature
name: Living Room Temperature
show_name: false
show_state: true
style:
icon_color:
- ‘{{ states(’‘sensor.lr_weather_temperature’‘) | int | gt(20) | ‘‘red’’ }}’
- ‘{{ states(’‘sensor.lr_weather_temperature’‘) | int | lt(20) | ‘‘blue’’ }}’