Hey,
may be someone can give me a hint
I try to convert a UNIX Timestamp into a usual datetime format, but all the my attempts fail
Here is the sensor output as an integer: 1671693131000
I tried various attempts like the one described in Convert UNIX Time to normal Time or Timestamp convertion + time difference - #2 by Troon
I found a solution, the provided Unix Timestamp is to long β¦ so I cut off the last 3 figures
1 Like
Donβt forget to share the solution code to your question for the next guy running into the issue
Sure here my code:
value_template: "{{as_datetime((state_attr('sensor.jaalee_sensor', 'list')[0].createTime | string)[:10])}}"
I cut of the last part of that UNIX Timestamp
1 Like