Reset ProgramPhase when OperationState becomes terminal (#261)#263
Reset ProgramPhase when OperationState becomes terminal (#261)#263Asmir1975 wants to merge 3 commits into
Conversation
Fixes hcpy2-0#261 - devices don't send ProgramPhase=None on program end, so the retained MQTT value stays frozen.
for more information, see https://pre-commit.ci
|
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? |
|
Hi @Meatballs1, thanks for the feedback.Your concern about mirroring device state is valid. The issue is probably related to 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. A few options, happy with whichever direction you prefer:
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! 🫣 |
7d8ea01 to
96fc0e1
Compare
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=Finishedwithout a ProgramPhase key. The patch detects this and resets ProgramPhase toNone.ProgramPhase cleared on
Finished. WhenReadyfollows, ProgramPhase is alreadyNoneso nothing is published again.Second test: Manual abort (Standard 60C, ProgramPhase was
PreRinse)Program aborted via IOS HC app. Device sent
OperationState=Abortingwithout a ProgramPhase key.Same as above.