Entity icon based on difference between current and previous value

I’d like to adapt the temperature icon so that it has an arrow pointing up or down depending on whether the current-previous value is positive or negative. How would one do this?

Also, since the icon will have to be something I design myself, how do I point to it? Currently I’ve only used mdi icons so I’m not sure. Do I put the icon files somewhere in the HA directory?

Use the Trend Binary Sensor to determine if the value is increasing or decreasing: https://www.home-assistant.io/components/trend/

Create a template sensor based on your temperature sensor that changes icon based on your binary sensor, example here: Binary sensor state text

You can use any of the up and down mdi icons or use your own png files, example here: Binary sensor state text

1 Like