I recently install Custom-UI and can do a basic icon color change without issue so I know it’s working. But now I’m trying to change the color of an icon based on whether two version sensors match or not. After reading a number of posts regarding similar actions, I still can’t seem to figure out exactly how to compare the sensors. I’ve tried a number of variations of this sort of thing, but none of them seem to work:
sensor.current_version: icon_color: salmon sensor.latest_version: templates: icon_color: if (state === sensor.current_version.state) return 'green'; else return 'red'; # Have also tried... state === states.sensor.current_version.state state === hass.states.get(sensor.current_version)
Can you not do a simple state comparison with customize.yaml?