Skip to content

Add set_program service to Miele #143442

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

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from

Conversation

astrandb
Copy link
Contributor

@astrandb astrandb commented Apr 22, 2025

Proposed change

Add service action Set program.
This action is used to start a program on applicable appliances. For ovens you can specify run time and target temperature, for other appliances you should just set program_id.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

Comment on lines +18 to +33
duration:
selector:
number:
min: 0
max: 240
mode: box
unit_of_measurement: min
example: 120
temperature:
selector:
number:
min: 100
max: 300
mode: box
unit_of_measurement: °C
example: 200
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would recommend to split this into 2 services, one specific for ovens, since this way we at least avoid adding more things in the future imo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that it would make things easier for the users. Duration and temperature are optional for ovens. If you don't specify them, defaults for the selected program are used in the appliance. In addition it is not documented which models that support these parameters. I suggest that we keep it as on common set_program for all devices and await comments from the users. There has not been any complaints regaring this service action in the user base for the custom component.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing I am most worried about is the slippery slope, so now we only have an oven, but in the future maybe an area for a robot vacuum or lawn mower, which in the end could make this service a mess.

Does every oven support this? Or only certain ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not documented. But I have good reasons to believe that support is not complete across the entire portfolio. There are ovens, microwave ovens, steam/oven combos all with limited support in the public API. Then there are coffee systems, dishwashers, etc, The suggested service supports all known (as of today) implementations of set_program in the public API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current service action is what is needed to support the most "controllable" ovens. A mandatory program_id, and optional duration and temperature. I don't see the point with a specific service for ovens. The API has been stable in this area since the beginning.

@astrandb astrandb marked this pull request as ready for review April 22, 2025 11:08
@epenet epenet changed the title MieleService1 Add set-program service to Miele Apr 22, 2025
@epenet epenet changed the title Add set-program service to Miele Add set_program service to Miele Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants