Skip to content
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

BUG Allowed: min 1 max 3 step 1 #135

Open
andreadegiovine opened this issue May 23, 2024 · 3 comments
Open

BUG Allowed: min 1 max 3 step 1 #135

andreadegiovine opened this issue May 23, 2024 · 3 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@andreadegiovine
Copy link

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
Copy link
Owner

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

@gvigroux
Copy link
Owner

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 ?

@gvigroux gvigroux added the help wanted Extra attention is needed label Sep 30, 2024
@davidanderle
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants