core icon indicating copy to clipboard operation
core copied to clipboard

Add set_profile service for Vallox integration

Open treetip opened this issue 1 year ago • 7 comments

Proposed change

Add service for activating a profile with optional duration for profiles that support it. Add sensor for reporting duration left on activated profile.

Type of change

  • [ ] Dependency upgrade
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ ] New integration (thank you!)
  • [x] 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

  • Tested on my Vallox 125MV running 2.0.24 firmware

Checklist

  • [x] The code change is tested and works locally.
  • [ ] Local tests pass. Your PR cannot be merged unless tests pass
  • [x] There is no commented out code in this PR.
  • [x] I have followed the development checklist
  • [ ] I have followed the perfect PR recommendations
  • [x] 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.
  • [ ] Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

treetip avatar Jun 23 '24 08:06 treetip

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:

Learn more about our pull request process.

home-assistant[bot] avatar Jun 23 '24 08:06 home-assistant[bot]

Hey there @andre-richter, @slovdahl, @viiru-, @yozik04, mind taking a look at this pull request as it has been labeled with an integration (vallox) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of vallox can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign vallox Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

home-assistant[bot] avatar Jun 23 '24 08:06 home-assistant[bot]

~I'd better add optional duration parameter to existing set profile services.~

Scratch that. Misread the code.

yozik04 avatar Jun 23 '24 14:06 yozik04

Merged the settable/reportable constants, settable already supported 'fireplace' mode which works the same as extra mode.

treetip avatar Jun 24 '24 06:06 treetip

The code looks OK to me. Test coverage is missing.

yozik04 avatar Jun 24 '24 17:06 yozik04

Let me know if there's still something pending

the requested changes seem to concern something that was discussed and changed already

treetip avatar Jun 25 '24 18:06 treetip

@joostlek hox, split done, should be all ready now

treetip avatar Jun 30 '24 07:06 treetip

I think the Vallox integration documentation needs to be updated with information about the new service too (https://github.com/home-assistant/home-assistant.io/blob/current/source/_integrations/vallox.markdown).

slovdahl avatar Jun 30 '24 17:06 slovdahl

Added documentation in home-assistant/home-assistant.io#33522

treetip avatar Jul 02 '24 12:07 treetip

What's the status with this? Has been done for a while and not clear to me at least what's preventing merging.

treetip avatar Jul 16 '24 15:07 treetip

Finally got back to this, rebased to continue working, but i can't commit anything locally due to:

Unknown rule selector: 'ASYNC210' in the hassfest commit hook.

Any tips on this? I couldn't find anything on google related to this in general or directly related to hass.

edit: run scripts/setup to update deps, for some reason pycharm didn't suggest this

treetip avatar Sep 07 '24 07:09 treetip

Oh shit, forgot to check for the documentation. Can you please open a docs PR from and to the next branch with the docs for this service?

joostlek avatar Sep 08 '24 13:09 joostlek

Oh shit, forgot to check for the documentation. Can you please open a docs PR from and to the next branch with the docs for this service?

has been there for a while: https://github.com/home-assistant/home-assistant.io/pull/33522 i'll update the keys to the lower case ones tomorrow if someone else doesn't do it first

treetip avatar Sep 09 '24 11:09 treetip