Can somebody help me out with some templating? I want to create a sensor which shows how long ago our baby had its last feeding. I want to have that like “02:35”.
I have the following sensor which returns the time of last feeding
{{ state_attr(‘sensor.baby_last_feeding’,‘end’) }} returns: 2022-03-30T17:16:00+02:00
Thanks! That does work, but it gives me the time of the last feeding.
Maybe my initial post wasn’t clear, but I what I want is that if the last feeding for example was 18:00 and the time now is 20:15, the template should show: 2:15.
I don’t know about you but if I don’t include false as the second argument in the timestamp_custom function, the calculated time difference isn’t offset correctly with respect to my timezone.