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

Filter out-of-range target temperature sent from underlying climate devices #581

Merged

Conversation

gpayer
Copy link
Collaborator

@gpayer gpayer commented Oct 25, 2024

My initial goal was to filter out stupid data from my Bosch BTH-RA thermostat. But this change makes also sense in the grand scheme of things, because it unifies the user experience. It doesn't matter whether you change the target temperature via the HA frontend or directly with an underlying, min and max are considered in both scenarios.

At the moment there are no unit tests, as I still have to figure out how to create one for this scenario, but I will try to do that in the next days.

This implements #576.

Copy link
Owner

@jmcollin78 jmcollin78 left a comment

Choose a reason for hiding this comment

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

Hello @gpayer ,

nice to see you take time to do the PR. I think there is a unit test failing now. Can you have a look please ?

@gpayer
Copy link
Collaborator Author

gpayer commented Oct 26, 2024

Hey @jmcollin78,

thanks for taking a look at my pull request. I fixed the broken test case, it was directly affected by my change, as it tried to set the temperature to a now filtered value. Now a different temperature is used and all is well.
Based on that test case I was able to create my own one, so now this code is actually tested!

Copy link
Owner

@jmcollin78 jmcollin78 left a comment

Choose a reason for hiding this comment

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

That is a great change. Thank you for this. It will be in the next release.

@jmcollin78 jmcollin78 merged commit 60bd522 into jmcollin78:main Oct 27, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants