State based entity_picture?

Prior to Lovelace I installed the excellent custom-ui of andrey-git via
extra_html_url:
- /local/custom_ui/state-card-custom-ui.html

One of the features allows the following javascript code in customize.yaml:

cover.garage_door:
templates:
entity_picture: >-
if (state === ‘open’) {return “/local/icons/garage-open-red-40.png”;} else {return “/local/icons/garage-40.png”;}

That resulted in state-based “icons” (entity_pictures) wherever the entity appeared, including glance cards in Lovelace.

This no longer works in 93.0 because frontend extra_html_url is ignored. Is there an alternative way to accomplish the above with Lovelace?