-
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 #13
Comments
@LLukas22 WDYT ... is this approach feasible? Do you have a hint regarding the long list of properties, how to do this in a more efficient way? Thanks for your input/feedback 👍 |
@LavermanJJ In theory we don't need to create new subclasses, we only need to create n instances of already defined classes and pass in the offset input and holding addresses. The factory would iterate a predefined range of addresses and create the component instances and return them as a list. Implementing a better method to set values is a bit tricky ... Regarding the list of properties you mentioned i don't know what you mean with extending it. |
According to Solarfocus spec, some components can be present more than once. Currently, this library only supports one of each.
Proposal on how to achieve this:
__init__
needs to be extended, so that the desired count for each component can be set, and passed to the factory methods.def update_heating(self) -> bool:
methods iterate each element, and update itsetter
methods (e.g.def hc1_set_target_supply_temperature(self, temperature) -> bool:
self.heating_circuit
) becomes a listComponentFactory
needs to create components in accordance with the passed count and returns them as list@data_class
) to avoid such a long list of properties?... and more
The text was updated successfully, but these errors were encountered: