gvigroux / hon

Support of all Haier, Candy, Hoover appliances integrated in the official hOn mobile app. Direct access to all possible services and parameters
MIT License
135 stars 51 forks source link

BUG Allowed: min 1 max 3 step 1 #135

Open andreadegiovine opened 4 months ago

andreadegiovine commented 4 months ago

Hi, when try to start a program on my HWPD 69AMBC/1-S (washing machine) an error occured:

Allowed: min 1 max 3 step 1

when integration set the defaults params values:

/config/custom_components/hon/device.py::start_command()
...
self.update_command(command, self.attributes["parameters"])
...

The fix is to use a min value instead trow the error here:

/config/custom_components/hon/parameter.py::106

...
raise ValueError(f"Allowed: min {self._min} max {self._max} step {self._step}")
...
to
...
self._value = self._min
...
gvigroux commented 3 months ago

just to understand, how do you start the program ? because normally they all have default values that match with what is expected

gvigroux commented 3 months ago

I checked and I cannot do the modification because this piece of code is used in a lot of context (like setting the temperature). I've added one log to understand the value passed.

How do you start the program ?