Closed Guzz-T closed 1 year ago
Interested in submitting a PR? I have very limited time at the moment 😓
I could give it a try.
Got a first draft. Could you give me the rights to push a branch?
Got a first draft. Could you give me the rights to push a branch?
The typical workflow is to create a fork of the repository and prepare / work in your own repository. Once you think its good to go, you can create a pull request ;-).
Opened a pull-request. See: https://github.com/Bouni/python-luxtronik/pull/86
The current implementation uses class variables for the fields
Parameters.parameters
,Calculations.calculations
andVisibilities.visibilities
. Due to this, the memory for storing the read data is shared by all instances of theclass Luxtronik
.Possible solution1:
Do not buffer the read data, but return them by calling
read()
. Just define the data structure within theCalculations.py
(and so on).Possible solution2:
Move the variable declaration into the
__init__()
section of theclass Calculation
(and so on).Benefits:
If the instances are independent from each other, the interface could be used for multiple heat pumps in a multi-threaded application (like
Homeassistant
).In terms of the OOP, solution 1 would fit better, since the data read does not belong to the luxtronik-read/write-interface