Issue with sync_command #16
No reviewers
Labels
No Label
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: GitHub/pyhOn#16
Loading…
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
startProgram
the ‘machMode’ become like a fixed. Only value ‘1’ allowed It happens bcsstartProgram
also has parameter ‘machMode’ but with type fixed. So, when you sync fixed -> range you do the reset for ranges.Also i exxtended
sync_command
with ‘to_sync’ parameter: - if to_sync==True -> will sync only mandatory parameters - if to_sync is list -> will sync only parameters that exists in to_sync list+2 minor fixes. - if cannot find parameter - havee to just continue (not return) - improved virtual ‘active’ state for water heater
This is important for other functions and will introduce problems for other appliances if we remove it. Please use
startProgram.program
to 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.program
to ‘eco’ thenmachMode
is 1, if you changestartProgram.program
to ‘max’ thenmachMode
is 2 and so on. So you don’t need to changemachMode
itself at any time, you can work with changingstartProgram.program
and it’s ok thatmachMode
is fixed, it will be updated with the changing program. This is how I implemented it for other appliances. The user can’t changemachMode
itself, you always need to changestartProgram.program
Is 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_command
Should be fine now.All fine now, thanks 👍