Entity_picture not working

Hi All,

Suddenly this is not working.
The icons of the entities are gone and not show. The files are still there…

HA 2021.7.2

device_tracker.1717fe36_3c70_4599_963c_b70b6ee95eba:
  friendly_name: "Peter Locative"
  templates:
    entity_picture: if (state === 'home') return '/local/images/person/peter-home.png'; return '/local/images/person/peter-away.png';

device_tracker.peter_iphone_geofency:
  friendly_name: "Peter Geofency"
  templates:
    entity_picture: if (state === 'home' ) return '/local/images/person/peter-home.png'; return '/local/images/person/peter-away.png';

I don’t recognize the syntax. Where is this excerpt from?

I use this already for 1 year now… haha

Great but you didn’t answer the question.

found the syntax here on the forum… long time ago

Do you use customUI? That’s the only place I remember this syntax for customization.

That can be… have to dig little more… Its long time ago i add this. So maybe i forgot it.

customui is installed correct. But have to check things. Because its working. Have to check it out.
Thanks to help me into right way… was forgotten i used customui