Hi,
I’m starting with HA and up to know all the info from the community and YT videos help me a lot!
I’ve already a device being tracked by owntracks and everything works very well so I realized that MQTT also give me the last updated time so I decided to wrotw a line to get that info too (besides battery level and location), the problem is that the time is returned in seconds so,…
Can someone please help me to know how can I convert this value to a human readable “Time_date” format?
Thanks in advance!
(The code to retrieve the time from MQTT with owntracks is the following)
Thanks for your answer. But actually at the time that I wrote this post I have already read that page, the thing is there are any examples of how to use “now” “utcnow” “as_timestamp” or any related “time Template extension” and I’m really lost because I’ve tried doing different combinations of the “now” extension in the “value_template” string without any success. I also found “Template sensor” but I’m unable to change the number to a human readable form.
So please, can you help me to know where I can find an example of “now” or what should I do in my senor code?