-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Add possibility to have multiple values for every modbus hvac mode #98829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hey there @adamchengtkc, @janiversen, @vzahradnik, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
d3dca59
to
bb55e33
Compare
Before we review it you need to solve the linter errors. You also have to think about, if your way, also works when setting the hvac_mode, please do not forget this climates inherit from the general climate entity, so all its functionality must be guaranteed. Without having thought too long about it, another (might be even simpler) solution is to allow multiple integers at each state, and define that the first integer is used to set hvac_mode. |
Why have you marked the manifest file, as far as I can see you have not touched it (and please do not touch it). |
Ah you're right, setting is a thing I didn't think about. To your approach: the change it not that big and the workflow wouldn't differ that mich. For me the question rather is what's the preferred way for the configuration? |
To put it simply, I am not sure.....of the head it seems a bit more natural and consistent with other parameters to have : register value, but I have NO firm opinion. |
4e0cd22
to
17595bb
Compare
@janiversen I switched to your idea of setting an array of multiple values. And the code is already able to just set the first mentioned value in the config. core/homeassistant/components/modbus/climate.py Lines 172 to 188 in 17595bb
|
I will review it later, but please do not forget to submit a pull request with a documentation update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the changes look ok to me.
But we need a documentation pull request also, to tell others how it works.
Be aware that "current" on home assistant.io have just had a major rewrite of the modbus integration. it seems these changes are not available on "next". Let me ask someone who knows. Waiting for an answer.
If you want to start on documentation, then please base your PR on "next" but use modbus.markdown from "current", I will update this information once I know more.
Please do not forget to change the status of this PR, it is currently "draft".
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
I have just been promised that "next" will be synced with "current", so in a couple of hours I presume you can "git pull" next, and get started....but I will confirm when I see that "next" is updated. |
"next" is updated, so now is the time, if you want your change to be part of 2023.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
Breaking change
Proposed change
With this change it's also possible to set multiple values for every hvac mode. When setting a mode the first value is used.
My boiler has no special register for just on-off but a register with the current active power mode (0=off, 1=500W, 2=1000W, ...). But this is not possible to handle with the current configuration.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: