Home connect duration of washing machine

I get unavailable on duration and the remaining program time is a datetime. I expect that to be seconds or minutes.
Or am I wrong?

Nobody will be able to tell you anything if you don’t tell what device / integration / configuration your washing machine has.

I thought the title was enough.
Home connect which means it’s a Bosch (could probably be a Siemens also).
Can’t remember the model but i believe this is due to the API gives this response.

Sorry. It was not obvious to me that “Home Connect” was the name of an integration.

Nobody else that uses a Bosch washing machine with Home connect?

Hi @Hellis81 - I have the exact same issue with the duration of my washing maschine

I’m trying to figure out a way to calculate remaining time with now() and usng that as a duration for the timer.

WIP
sensors.yaml

  - platform: template
    sensors:
      waschmaschine_dauer:
        value_template: "{{ as_timestamp(states('sensor.waschmaschine_remaining_program_time')) - as_timestamp(now())}}"

There is also the sensor.washmaschine_program_profress that is percentage of the washing cycle.
I just use that instead. It’s a shame the integration is “broken” or whatever is causing it.
According to the docs it should be a countdown or I don’t understand this.

If the device has programs, a timestamp sensor for remaining time and a numeric sensor for the progress percentage.

I don’t know how something can be both a timestamp and remaining time.

I just tried the real api and it sends a integer value.

8700 seconds seams reasonable since the machine is now at about 30%.
So this seems to be a bug in the integration. The value that is received from the API is somehow converted/manipulated to this timestamp instead of just giving us the real value.

It seems now that I looked deeper on it, the timestamp is actually correct that the integration states.
It’s just reported as UTC time. :man_facepalming:

When I convert it to timestamp it becomes:

And looking at the time left in seconds + what time it is now it seems to match up.

I didn’t look at the obvious since the entity name was too confusing. It should perhaps be named “washing machine finish time UTC”, because that is what it’s displaying, not the remaining time.

Hi @Hellis81 @koying @srsbaca
I`ve made this sensor to show the remaining time based of the choosen program. If the dishwasher is powered on the sensor will display the time remaining of the program if the dishwasher is powered off the sensor will display " : -:-- "
Here is the sensor:

  - platform: template
    sensors:
      remaining_time:
        friendly_name: "Remaining Time"
        value_template: >
            {% if states('sensor.402110526515021364_bsh_common_option_remainingprogramtime') == 'unavailable' %}  -:--
            {% elif (as_timestamp(states('sensor.402110526515021364_bsh_common_option_remainingprogramtime'))) >0  %}
            {% set sec = as_timestamp(states('sensor.402110526515021364_bsh_common_option_remainingprogramtime'))-as_timestamp(now()) %}
            {%set hr = (sec / 3600) | int %}
            {%set min = sec / 60 - hr * 60%} 
            {% if hr > 0 and is_state('switch.402110526515021364_bsh_common_setting_powerstate', 'on' ) %}
              {{"%d:%02d" % (hr, min + 1)}}  
            {% elif sec | round(1, default=0) <0  %}  
              -:--
            {%elif is_state('switch.402110526515021364_bsh_common_setting_powerstate', 'on' )%}
              {{"%d:%02d" % (hr, min + 1)}}
            {%else%}
              -:--
            {% endif %}
            {% endif %}

Hope this will work also for you

2 Likes

Also, this is my GUI of the Bosch Diswasher I use


@cristidobrescu You will provide the code for this GUI?