hon
hon copied to clipboard
BUG Allowed: min 1 max 3 step 1
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
...
just to understand, how do you start the program ? because normally they all have default values that match with what is expected
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 ?
I'm having the same issue with my HD 496AMBCB/1-80 washer dryer (otherwise working well). I've set up a button to perform the action as such:
show_name: true
show_icon: true
type: button
tap_action:
action: perform-action
perform_action: hon.start_program
data:
program: low_dry
target:
device_id: <my_device_id>
icon: mdi:tumble-dryer
layout_options:
grid_columns: 1
grid_rows: 2
name: Low heat dry
show_state: true
I am guessing that this should be using the default values: delayTime: [0 - 1410] - Default: 0 - Step: 30 dryLevel: [1, 3, 4] - Default: 4 dryTime: [1 - 4] - Default: 1 - Step: 1 lang: [0 - 25] - Default: 1 - Step: 1
However, even if I specify the parameters such as:
data:
program: low_dry
parameters: >-
{'delayTime':0,'dryLevel':4,'dryTime':1,'lang':1}
I still get the following error:
Failed to perform the action hon/start_program. Value [0] - Allowed: min 1 max 4 step 1
Any idea what might cause this? Let me know if you need more info @gvigroux
I will release a new version in 10 min that will display the name of the problematic parameter. Let's see after that
I will release a new version in 10 min that will display the name of the problematic parameter. Let's see after that
Hi, I am experiencing the same issue. I tested multiple programs, both with default settings and customized parameters. This update displays the parameters, and it seems that the error parameter is always the first one with a default value that is not zero.
Do you have some suggestions? Thanks a lot!