mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
002861f13b2e3a9dfd16a1157b12894daf08a6cb
This patch fixes faulty behaviour when both, invert and min_power/max_power are set for a float output (e.g. PWM). The current code scales the output level to the range [min_power, max_power] and subsequently inverts the value. This leads to values that are outside the range [min_power, max_power]. This patch fixes the problem by inverting the requested level first and then scaling it to the interval [min_power, max_power]. Co-authored-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
ESPHome

Documentation: https://esphome.io/
For issues, please go to the issue tracker.
For feature requests, please see feature requests.
Description
Languages
C++
68.3%
Python
31.5%
C
0.1%