@dantist wrote:
I have a markdown card in lovelace that shows when the front door was last opened, but it’s one hour off.
content: >- {{ states.binary_sensor.homematic_door_sensor_state.last_changed.strftime('%H:%M Uhr (%d.%m.%Y)') }} title: Tür zuletzt geöffnet type: markdown
As stated here by @pnbruckner, “last_changed” is not timezone aware. But I cannot find out how to adjust the timezone in lovelace. I was able to change the string by doing this:
{{ states.binary_sensor.homematic_door_sensor_state.last_changed|regex_replace(find='\+00:00', replace='+01:00') }}
but then I cannot use strftime on the result. Any ideas how to solve this in an elegant way?
Posts: 1
Participants: 1