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

Use home/sleep preset in ViCare climate entity #105636

Merged
merged 5 commits into from Jan 31, 2024

Conversation

CFenner
Copy link
Contributor

@CFenner CFenner commented Dec 13, 2023

Breaking change

Proposed change

This makes the default ViCare programs normal/reduced (Nachtabsenkung) map to the HA presets home and sleep.

Bildschirmfoto 2023-12-13 um 10 42 38 Bildschirmfoto 2023-12-13 um 10 42 51 Bildschirmfoto 2023-12-13 um 11 19 04

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

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.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@MartinHjelmare MartinHjelmare changed the title use home/sleep preset in ViCare climate entity Use home/sleep preset in ViCare climate entity Dec 13, 2023
Comment on lines +96 to +97
PRESET_HOME: VICARE_PROGRAM_NORMAL,
PRESET_SLEEP: VICARE_PROGRAM_REDUCED,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This results in having the presets selectable via select or button. But actually these presets are determined via the internal heating schedule. So they cannot be activated. When selecting the "home" during night time, there will be no error, but the preset will fallback to "reduced".

Is this behavior acceptable? I would like to see which preset is active (like seen on the device page).
Bildschirmfoto 2023-12-13 um 11 19 04

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened a feature discussion on that topic

home-assistant/frontend#19037

Copy link
Member

Choose a reason for hiding this comment

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

Euh I don't really see what problem you are pointing at, could you maybe elaborate a bit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Viessmann heatings are always running on a schedule, normal (day) and reduced (night) that the user can define on its own.
These are presets that are determined by the schedule only, one cannot activate/deactivate them. One can only overrule it with the other presets like eco, comfort.

Copy link
Member

Choose a reason for hiding this comment

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

So there are some presets that can be used and some that can not?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but I think it's valuable to see which one is active and not just display none. Therefore the feature request to display it.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, so what will we do in this PR? Add the presets so they will show?

What if we set it to a preset you can't select?

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 would also be fine with removing this change and just go with the changes from line 88, so I can see the preset on the entity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What if we set it to a preset you can't select?

Integration will ignore reduced and normal. So when you select normal during night time it will just do nothing and flip back to reduced.

@CFenner CFenner marked this pull request as ready for review December 13, 2023 11:43
@joostlek joostlek merged commit 2dbc59f into home-assistant:dev Jan 31, 2024
23 checks passed
@CFenner CFenner deleted the presets branch January 31, 2024 12:02
@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants