How to use the date format relatively?
Closed this issue · 5 comments
Hello,
First of all, thanks for this integration, as someone with next to no coding knowledge this saved my life, inputting this data into home assistant is very nice.
You mention on the github page that it is possible to format the date relatively, to have the PMD sensor display: "in 2 days", instead of date/month/year. How do I do this? I've looked into the python date/time formatting but am at a complete loss, and also cannot find anything about the innate HA time templates you mentioned..
I tried a workaround creating template sensors which do the correct thing (see example), but in this case I lose the nice looking custom icons, which I definitely want to use, as otherwise I'd have to come up with custom icons somehow.
Example of my current format on the first row, and using template sensors on the second row, I'd like the timestamps combined with the icons:
Thanks in advance!
Kind regards,
Joris
Hello @Devairen ,
Thank you for your feedback ❤️.
To show relative dates, you may type "TIMESTAMP" in the date format field.
Sample:
timestamp-demo.mp4
Does it work for you?
Hello Olivier,
Sadly not, I figured this is what you meant initially, but Home Assistant doesn't seem to process this timestamp date correctly into relative time..
I've deleted and reconfigured just to make sure, and the same behavior stays.
Thanks for the feedback