Closed viktak closed 1 year ago
+1 Trying to convert a timestamp to local datetime with no success using the following:
{{as_local(as_datetime(states.sensor.s20_kaue_last_reboot.state))}}
Templates are JS. You are trying to use jinjia2 templates! Rewrite your templates to JS then.
title: "Connected clients at ${ vars[...] }"
Wrong. Must be:
title: '${ "Connected clients at " + vars[...] }'
title: "${ vars['timeStamp'] }"
Try just this:
title: '${ timeStamp }'
Old issue, answers were provided.
Checklist:
Release with the issue: 1.3.6
Last working release (if known):
Browser and Operating System: Firefox, Brave @ Windows 11 Pro
Description of problem:
Javascript errors shown in the web inspector (if applicable):
I have the following template card:
It works correctly as you can see it here. However, in the
title
of the card I would like to:and this:
both resulting in the whole card being not rendered at all. Note, both work OK in the Template editor within HA.
I tried this the following way:
Again, the result is that the whole card is gone. Additional information: Here is the console log from FF: