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

Preheating support in History Chart #23878

Merged
merged 1 commit into from
Jan 25, 2025
Merged

Conversation

ocrease
Copy link
Contributor

@ocrease ocrease commented Jan 25, 2025

Proposed change

PREHEATING was added as an HVACAction a while ago, but the history charts do not shade the area under the current temperature which they do if the HVACAction is HEATING.

Original architecture discussion: home-assistant/architecture#710
Original Core PR: home-assistant/core#94677
Original Frontend PR: #16922

Issue: #23876

This PR uses CLIMATE_HVAC_ACTION_TO_MODE to map the HVACAction to a mode in the same way that the thermostat card does to colour the background when heating or cooling. It does mean that HVACAction.DEFROSTING is also captured by this change.

As a side note, I don't understand why defrosting is mapped to heat, the architectural discussion for defrost specifically says the system is not currently generating heat. In my view, defrosting should be mapped to off, but that would be the topic of a separate discussion.

As second side note, on the defrosting discussion there seemed to be some confusion about what preheating means. When a device is heating, it is heating up to a set temperature. When preheating, it is heating to a future set temperature. See the images on the linked issue.

This is my first PR to Home Assistant Core or Frontend, so if I have missed anything let me know.

Type of change

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

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

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

… that history chart correctly shows preheating and defrosting as heat
Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

Hi @ocrease

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant home-assistant bot marked this pull request as draft January 25, 2025 00:10
@home-assistant
Copy link

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

Learn more about our pull request process.

@ocrease ocrease marked this pull request as ready for review January 25, 2025 00:24
@silamon silamon merged commit dd11b30 into home-assistant:dev Jan 25, 2025
18 checks passed
@silamon
Copy link
Contributor

silamon commented Jan 25, 2025

Thank you for your contribution! 🥇

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.

hvac_action of preheating not shown
2 participants