Bouni / python-luxtronik

python-luxtronik is a library that allow you to interact with a Luxtronik heatpump controller.
MIT License
37 stars 20 forks source link

Redundant datatype for pulses and counts #110

Closed kbabioch closed 1 year ago

kbabioch commented 1 year ago

It seems like the datatypes Pulses and Count are redundant:

https://github.com/Bouni/python-luxtronik/blob/c78ea22dbd5d557522d707e4e1f526cbdba07893/luxtronik/datatypes.py#L126-L129

https://github.com/Bouni/python-luxtronik/blob/c78ea22dbd5d557522d707e4e1f526cbdba07893/luxtronik/datatypes.py#L326-329

Instances where it is used:

https://github.com/Bouni/python-luxtronik/blob/c78ea22dbd5d557522d707e4e1f526cbdba07893/luxtronik/calculations.py#L140

https://github.com/Bouni/python-luxtronik/blob/c78ea22dbd5d557522d707e4e1f526cbdba07893/luxtronik/calculations.py#L101-L103

From my point of view this could be consolidated, since the semantics in those cases is the same.

Any objections?