-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support multiple heating circuits, boilers, etc #14
Conversation
Nice 👍 LGTM! Thanks for the quick and thorough work! Much appreciated! |
FMPOV it can be merged. However, I'm waiting for your final confirmation before merging, as you wrote "This is a first draft of the changes". |
One small remark, would you mind also adapting the Usage section in the REAMDE.md? Thanks! |
I Updated the README.md to showcase the new
I still consider this a draft, because i don't know how you would implement this in the home assistant implementation. I would also like to remove the direct getters and setters from the api, but that would break the compatibility with the current HA implementation. Maybe we could change this in the future? WDYT? |
Sounds reasonable. My initial idea was to merge this PR as it is backwards compatible and doesn't break something, and in a second step adopt the HA-integration (with the risk however, that we would need to adapt something again). Once the HA-integration is ready, we can get rid of the "compatibility stuff". However, I can also park it for now, until there is a concrete idea for the HA-integration. What do you mean with "direct getters and setters"? Are your referring to:
If so, that would be ideal, to get rid of them. |
Yeah i would like to remove those in the future, accessing those values over the components directly would be a lot cleaner. |
This is a first draft of the changes mentioned in #13.
I tried to abstract the
update
method into the specific components. This allows me to easily work with lists of components e.g. update 4 different buffers.I also tried to solve the problem with the setters for every holding value by creating a
commit
method that will write the current raw value of a DataValue to the modbus server.With these changes the api could be used like this:
To implement this i had to refactor some of the scaling code, would be great if you could verify if the values are still correct for your system. I already tested it for mine and it seams to work.