Issue with sync_command #16
Reference in New Issue
Block a user
No description provided.
Delete Branch "main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I discovered next issue
when my HomeAssistant start I see all modes related to my WaterHeater
machMode = [1,2,3]
in settings section this parameter has type 'Range'
However, after I call command
startProgramthe 'machMode' become like a fixed. Only value '1' allowedIt happens bcs
startProgramalso has parameter 'machMode' but with type fixed. So, when you sync fixed -> range you do the reset for ranges.Also i exxtended
sync_commandwith 'to_sync' parameter:+2 minor fixes.
This is important for other functions and will introduce problems for other appliances if we remove it.
Please use
startProgram.programto switch the mode instead ofsettings.machMode.Wait. Looks like my explanation is not so good.
So.
I use command 'startProgram' for turn on water heater. I have no any other ways to turn on appliance.
Next. startProgram has 3 params:
onOffStatus (mandatory, fixed)
machMode (optional, fixed)
tempSel (optional, fixed)
However, real settings.machMode is range, and has 1,2 and 3 modes (eco, max, bps). And it's correct type of this parameter.
I don't know why manufacturer implement parameter 'startProgram.machMode' as fixed. But, we have what we have.
As result. I call start program - >sync command replace range of 'settings.machMode' with only one value. It's incorrect. More over. I didn't touch sync if base and target parameter are range. I removed sync code only for case if base parameter is fixed and target is range. That's it.
Let me know of you need more examples.
@Andre0512
Any comments or suggestions from your side?
@Andre0512 hey man
will we continue on this request? Tell me, should I wait or not
Hi, sorry you had to wait so long!
So I can`t merge this unfortunately if it removes line 301-303, this will break functionalities of some appliances...
If you change
startProgram.programto 'eco' thenmachModeis 1, if you changestartProgram.programto 'max' thenmachModeis 2 and so on. So you don't need to changemachModeitself at any time, you can work with changingstartProgram.programand it's ok thatmachModeis fixed, it will be updated with the changing program. This is how I implemented it for other appliances. The user can't changemachModeitself, you always need to changestartProgram.programIs it understandable what I mean and can you try it? 🙂
@Andre0512 Thanks. I understood the concept. It was not clear for me at the start.
So, I rewrite my fork of hOn according to your explanation. All work. I revert back
sync_commandShould be fine now.
All fine now, thanks 👍