I am trying to convert a sensor from showing “hours:minutes:seconds” to show “hours:minutes”
This might be very straight forward but I cant find the right solution and would be very greatful for any help.
This is how far I got:
- platform: template
sensors:
waschmaschine_verbleibende_zeit:
friendly_name: "Waschmaschine verbleibende Zeit"
value_template: "{{ state_attr('sensor.waschmaschine', 'remain_time') | timestamp_custom('%H:%M', false) }}"
In the dev-tools, I get the following error:
ValueError: Template error: timestamp_custom got invalid input '2:52:00' when rendering template '{{ state_attr('sensor.waschmaschine', 'remain_time') | timestamp_custom('%H:%M', false) }}
Thanks a lot!