Customize_glob icon stopped working after upgrade


I just upgraded HA from 0.88.something to 0.94.3.
After this upgrade several things did not anymore. Most I have sorted now, but 1 thing I can’t get back working is my customize_glob that changes icon and color depending on the state of the entity.

I have several sensors created like this.

friendly_name: ‘Soverum Vindue’
entity_id: “binary_sensor.soverum”
value_template: “{{ ‘Closed’ if is_state(‘binary_sensor.soverum’, ‘off’) else ‘Open’ }}”

friendly_name: ‘Stue Vindue’
entity_id: “binary_sensor.livingroom1”
value_template: “{{ ‘Closed’ if is_state(‘binary_sensor.livingroom1’, ‘off’) else ‘Open’ }}”

Then I have created this
hs_color: “if (state === ‘Closed’) return [0, 0];
else if (state === ‘Unknown’) return [0, 85];
else if (state === ‘Open’) return [0, 85];”
icon: “if (state === ‘Open’) return ‘mdi:window-open’; else return ‘mdi:window-closed’;”

This used to work fine. When I opened a window, it would change the icon and make it red.
But now it just doesn’t work at all.


Anyone know what I need to do to correct this?


Were you using the old interface and now you are using the new one? Lovelace is very different than the legacy interface. Also, this glob requires the custom UI. Is that still installed? Have you updated that?

Yes, was using Lovelace before also. But maybe I did indeed forgot to update custom UI :slight_smile: I’ll have a look