Skip to content

Reset ProgramPhase when OperationState becomes terminal (#261)#263

Open
Asmir1975 wants to merge 3 commits into
hcpy2-0:mainfrom
Asmir1975:261-programphase-reset
Open

Reset ProgramPhase when OperationState becomes terminal (#261)#263
Asmir1975 wants to merge 3 commits into
hcpy2-0:mainfrom
Asmir1975:261-programphase-reset

Conversation

@Asmir1975

@Asmir1975 Asmir1975 commented May 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #261 - devices don't send ProgramPhase=None on program end, so the retained MQTT value stays frozen.

Tested on Siemens SX63HX52BE

First test: Normal program end (Quick45)

Device sent OperationState=Finished without a ProgramPhase key. The patch detects this and resets ProgramPhase to None.

dishwasher {'BSH.Common.Status.OperationState': 'Finished'}
dishwasher resetting Dishcare.Dishwasher.Status.ProgramPhase to None (OperationState > Finished)
dishwasher publishing 2 changed keys: {"BSH.Common.Status.OperationState": "Finished", "Dishcare.Dishwasher.Status.ProgramPhase": "None"}

dishwasher {'BSH.Common.Status.OperationState': 'Ready'}
dishwasher publishing 1 changed keys: {"BSH.Common.Status.OperationState": "Ready"}

ProgramPhase cleared on Finished. When Ready follows, ProgramPhase is already None so nothing is published again.

Second test: Manual abort (Standard 60C, ProgramPhase was PreRinse)

Program aborted via IOS HC app. Device sent OperationState=Aborting without a ProgramPhase key.Same as above.

dishwasher {'BSH.Common.Event.ProgramAborted': 'Present'}

dishwasher {'BSH.Common.Status.OperationState': 'Aborting'}
dishwasher resetting Dishcare.Dishwasher.Status.ProgramPhase to None (OperationState > Aborting)
dishwasher publishing 2 changed keys: {"BSH.Common.Status.OperationState": "Aborting", "Dishcare.Dishwasher.Status.ProgramPhase": "None"}

dishwasher {'BSH.Common.Status.OperationState': 'Ready'}
dishwasher publishing 1 changed keys: {"BSH.Common.Status.OperationState": "Ready"}

@Meatballs1

Copy link
Copy Markdown
Collaborator

Currently we just mirror exactly what the device sends, and don't add extra logic to manipulate the output, so I'm hesitant to start making changes that don't match the real state.

HA automations can check the Operation state to make decisions and a template can be used for this logic for a display status as an alternative?

@Asmir1975

Asmir1975 commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @Meatballs1,

thanks for the feedback.Your concern about mirroring device state is valid.

The issue is probably related to retain=True,once the device stops sending ProgramPhase, the broker keeps the last value and HA ends up showing Drying or PreRinse long after the program ended.

I tested two concrete scenarios on my Siemens IQ300 SX63HX52BE, the only device I can test on, both confirmed with full debug log and history.
Run - Finished - Ready on my device ProgramPhase stays frozen at Drying
Run - Aborting - Ready on my device ProgramPhase stays frozen at PreRinse

A few options, happy with whichever direction you prefer:

  • Narrow the PR to {"Finished", "Aborting"}.The other states you can adjust as you see fit
  • Close the PR. I am running an HA automation as workaround and that works fine.
  • Keeping open if someone else confirms the same behaviour in Dishwasher ProgramPhase not resetting to None #261 the issue gets stronger.

Your call,happy either way.

P.S. I have two small patches sitting in my fork.have a look if you have time and drop a note there what do you think about it.

Edit: Sorry for the noise , accidentally synced my fork branches again. No pressure, no rush! 🫣

@Asmir1975 Asmir1975 force-pushed the 261-programphase-reset branch from 7d8ea01 to 96fc0e1 Compare May 25, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dishwasher ProgramPhase not resetting to None

2 participants