Help with dishwasher automation

I am working on a automation for my dishwasher using its Home Connect remote control that in case of solar excess the dishwasher is triggered to start. The type of wash program is an entity and can be selected by a pull-down menu however when the dishwasher is turned on it always goes in the ECO Mode. I want to store the selected program and when the dishwasher is turned on, override the ECO Mode by the pre-selected program. I think a template can help but have not the skills how to do this.
How can I get this done?

What is the state of the select entity when the dishwasher is off?
You could trigger when the state changes to that specific state. When that happens, you can store the previous state. That can be done using the variables sensor in which you originally asked the question, but also in a text helper.

Then, when the state of that select entity changes again, from the off state to the ECO program state, you can trigger on that, and change the select entity to the state you stored in that sensor.

This will require use of some Jinja templates.

Create automation like

  • dishwasher turn on
  • change dishwasher select program - select your program
  • press start button

Attached a picture of the UI I made where I can pre-select the washing program. This is the dishwasher program entity. I select the desired program before switching on the dishwasher.
I have made two start options, the dishwasher can be started: one is manually and second by sun energy excess power. I made a slider where I pre define the level of excess power the dishwasher has to automatically start its program without further manual.intervention. Somehow I have to remember the program entity state before powering on and use this to override the default ECO mode when powered on.
Can you tell me how the jinja template should look like within the automation?

You dont need any template. Just create automation.

i also used to have issues with Home connect, especially with the selection of the program.

But I recently switched to another (local) integration from Hacs, that one allows me to select a program and set the starting time.

So far it works fine

alias: Kitchen - Set Dishwasher to start time at Lowest Price upcoming 12 hours
description: Set dishwasher starttime to lowest electricity price period
triggers:
  - entity_id: switch.siemens_dishwasher_power
    from: "off"
    to: "on"
    trigger: state
    id: DishwasherStartTime
conditions: []
actions:
  - variables:
      delay_seconds: >-
        {{[(as_datetime(states('sensor.lowest_price_next_12_hours_time')).timestamp()
        - now().timestamp()) | int, 86400] | min }}
  - action: select.select_option
    metadata: {}
    target:
      entity_id: select.siemens_dishwasher_selected_program
    data:
      option: dishcare_dishwasher_program_learningdishwasher
  - target:
      entity_id: number.siemens_dishwasher_start_in
    data:
      value: "{{ delay_seconds }}"
    action: number.set_value
  - target:
      entity_id: input_datetime.start_dishwasher
    data:
      timestamp: "{{ now().timestamp() + delay_seconds }}"
    action: input_datetime.set_datetime
  - delay:
      hours: 0
      minutes: 0
      seconds: 3
      milliseconds: 0
  - action: button.press
    metadata: {}
    target:
      entity_id: button.siemens_dishwasher_start
    data: {}
mode: single

I am currently using the HACS integration Home Connect Alt.
All settings are working fine except for the dishwasher program where at power-on the ECO mode is set. Frustrating.

I can try the Home Connect Local integration.

@ddaniell: starting the dishwasher remotely manually works fine but having the dishwasher started automatically the right program when conditions are met not. Can you provide more details what integrations you are using.

I'm using home connect local integration from hacs.
You can choose programs in this integration and set it up the way you want.

I don't see the issues you have.
You have so far just posted what you can't do and barely anything what you can do, and a picture of your dashboard.
Have you read the docs about the select entities? Select - Home Assistant
That should give you examples of how you select an option.
Does that not work? Have you tried it?
You keep saying you don't want the ECO mode, but what do you want? You have not yet said anything what you actually want to select.
Maybe you should actually start by telling us what you want instead of what you don't want?

The way I understand the problem from the first post is:

  • They want to prepare the dishwasher, but not immediately start it
  • They want to select a specific program (e.g. glass - silent) (note: I have no clue what programs are available, this is just an example)
  • They want to actually start the dishwasher when there is excess solar available
  • When the dishwasher is turned on at that moment, the dishwasher automatically defaults to the ECO program
  • They want to be able to use the program they selected when preparing the dishwasher.

My assumptions:

  • The dishwasher is turned off/idle between setting it up, and the moment it should start it's program
  • The select entity to indicate which program should run changes from the selected program to another state (off maybe) during that period.

My suggestion:

  • When the select entity changes from the selected program to off (or whatever the state is), store the previous state (which is the selecte program) in a text helper
  • When there is sufficient excess solar, turn on the dishwasher, and change the select entity to the program stored in that text entity before starting the program.

This will require some templates, as you need to access the previous state from the state trigger variables, for the first step, and you need to access the state of the text entity for the 2ne step.

But it could also be I completely misunderstood the problem :wink:

That is what I said :stuck_out_tongue:

He is using the same integration as I am; in this one the selection seems to work fine

1 Like

@TheFes,
your understanding from what I aim to achieve is correct.

As I wrote earlier, currently I have the Home Connect Alt integration installed and I wonder if I want to use Home Connect Local, I have to remove the Home Connect Alt first. Maybe someone can confirm?
I was not aware Home Connect Local exists. When searching in HACS, this integration does not show up, only the Alt version.

I looked at your suggestion to use a text helper, but when setting up such a Helper I have to input a text while the text I need changes depending on the selected program. I use Helpers frequently but have no clue how to set up a text sensor helper.

Yes, you should.

You probably have to add local integration to hacs.

No you don’t (I just disabled the integration, which renders all current entities unavailable)
But as a matter of fact, i currently still have it

Another option is to disable only the device (which i did earlier, as i had some issues with my ovens).
So the dishwasher was running local, and the ovens not :wink:

I have installed Home Connect Local on my Home Assistant TEST machine (a mini PC, so not my main PC running HA automations) and following the steps, I need my applicance profile that can be downloaded with the Home Connect Profile Downloader that provides me a zip file.
I wonder how the Home Connect Profile downloader is connecting to my Home Connect account. I see no username and password field. As far I know, you can only connect to Home Connect using a iOS or Android app not via a web portal while the download tool is on my PC. Maybe I miss a crucial step..
Any help/suggestions/hints is appreciated.

read the pre-requisite here —> GitHub - chris-mc1/homeconnect_local_hass: Home Connect integration for Home Assistant using direct communication over the local network · GitHub

  1. Use the Home Connect Profile Downloaderto download your Appliance profiles, select "openHAB" as target. The downloaded ZIP-file contains each Appliance encryption Key and feature descriptions

Hi aceindy, really appriciate your help.
I have done multiple integrations but seems I am too stupid to get this Home Connect Local to work.
The documents says:
Prerequisites

To use this integration, you must first create a Home Connect account and connect your appliances.

I have an Home Connect account, so how to connect to my appliances? Do I need to look for the IP address of my dishwasher and open this address in a browser? Or do I need to use the Home Assistant build-in Home Connect integration first?
Does the download tool requires to be logged in on my dishwasher? How?
For me the information provided is quite poor.
The tool downloads a file, where is it stored to import it in the integration?
When I go to Appliances and Services -> Add Integration -> selecting Home Connect Local, the first thing it ask for is the downloaded zip file of the tool.

I am missing a crucial step in the process but don't know what it is and how to, grrrr

Hi Fred54,

Never feel stupid to ask something you don't know :wink:

No, it downloads your equipment profile(s) from the Home-Connect site.

  • Find your downloaded files in c:\users<username>\appdata\Local\Temp\home-connect-profiles

These zip files are the profile files required to complete the setup of the integration.

You need to add the integration for every device you want to add one by one (in my case, 1 for the dishwasher, 2 for the ovens)

Hi acindy, thank you so much for the information, especially the link to the Home Connect download tool. This was the missing piece in the puzzle.

I succeeded to download my dishwasher profile and have this imported into Home Connect Local. The integration could not find my dishwasher but after using the ip address it was oke.
I noticed some entities were hidden and have activated some of them. When switching on the dishwasher I see the same effect that it goes in Eco 50,
How do you set your wash program, after switching on? Like I explained, I want the dishwasher to start the pre defined program when solar excess power exceeds a certain level. Does it mean I have to switch it on, select the program and put onhold the start? The dishwasher might switch off automatically because the start signal time window has expired.

In your case you want the dishwasher to start in the cheap electricity rate hours, so it is onhold untill this requirement is met?

I created input boolean helper that will go on when start button is pressed and it is on for x minutes. If you just press start button and don't select program it will turn it self off in 09:59 minutes.
With helper you know that someone requested dishwasher start and then you can create your automation to run dishwasher if helper is on and other conditions are met.