Customize_glob icon stopped working after upgrade

Hi,

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.

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

security_window_livingroom1:
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
customize_glob:
sensor.security_window_*:
templates:
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.

HA

Anyone know what I need to do to correct this?

Thanks

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