numeric opvasker

This commit is contained in:
2026-03-25 07:15:29 +01:00
parent c91e669761
commit 40c78ed6af
+21
View File
@@ -0,0 +1,21 @@
- platform: template
sensors:
dishwasher_remaining_minutes:
friendly_name: "Opvask tid tilbage"
unit_of_measurement: "min"
value_template: >
{% set val = states('sensor.dishwasher_remaining_time_2') %}
{% if val in ['unknown','unavailable',''] %}
0
{% elif ':' in val %}
{% set parts = val.split(':') %}
{{ (parts[0] | int * 60) + (parts[1] | int) }}
{% elif 'min' in val %}
{{ val.replace('min','') | int }}
{% else %}
{{ val | int(0) }}
{% endif %}