Hi All,
I have tried but have not found any elegant way to create a template sensor to show me the age of my newborn. The format would display the age in the format: years, months, days, hours, minutes, seconds.
If anybody can help with an example, that would be much appreciated.
That’s because our calendar, with its irregular length months, makes a relative calculation like that stupidly complicated to do in Jinja… There is a python module relativedelta that does those types of calculations, but (as far as I know) you can’t access it through templates in HA.
Yeah, getting days is straightforward… I have the sensor showing weeks and days rather than days, but as our baby is getting older… I would need for the sensor to show 1 year 2 months 3 days 4 hours 53 sec
@Didgeridrew So the only way, for now, is to do the integration for it isn’t it? Too bad I do not have experience with building integrations
Unlike the old days when the color of the life-clock crystal in the palm of one’s left hand indicated your age (and when it was time to “renew”).