Device trackers template not anymore working?

I have this in my customize.yaml:

  device_tracker.galaxy_s8:
    templates:
      theme: >
        if (state === 'home') return 'green';
        return 'red';
      _stateDisplay: >
        if (state === 'home') return 'A casa';
        return 'Fuori casa';

And it worked well on 0.69.1, but after upgrading to 0.70.1 i get this:

43

Is this correct ?

generally in yaml, an if statement is surrounded by {% and %}…

  device_tracker.galaxy_s8:
    templates:
      theme: >
        {% if state.device_tracker.galaxy_s8.state== 'home' %}green{% else %}red{% endif %}
      _stateDisplay: >
        {% if states.device_tracker.galaxy_s8.state == 'home' %}A casa{% else %}Fuori casa{% endif %}
``

@Mariusthvdb any input?

not sure what the question is. If the issue is the more-info card is showing all templating details, I believe this is something @andrey is working on, or at least recognized as being changed (broken) after the update.

as far a i can see, the templates themselves are correct? Or is the frontend showing something else?

I only asked you because you do this all the time. I figured you’d know if it was a bug or not because all your stuff would be broken

nothing broken here. At least not in customizing the device_trackers :wink:

Im struggling templating the Plex sensors for now, albeit with a bit of customizing

So we must only wait for a fix from @andrey?

if you would specify your problem a bit more specific, we could probably be of better assistance.
Don’t your customizations function anymore?

well, ymmv…
both options work, being either javascript in side the browser or jinja on the server side.

It’s simply what you see on my screenshot… i am asking if what i see in the cards about templates is correct or not… i mean we must see the templates code in cards or not?

well, im not 100% sure.
As long as your templates are showing the desired result in Hassio frontend, I would suggest you follow CustomUI - discussion thread for @andrey s feedback on issues regarding the custom-ui.

do download the latest versions to be up to date.