Closed gpayer closed 3 weeks ago
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!
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.