1
0
mirror of https://github.com/esphome/esphome.git synced 2025-02-11 15:38:19 +00:00
dubit0 002861f13b
Float output: Fix min_power and max_power adjusting when output is inverted (#1250)
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>
2020-10-01 19:55:42 -03:00
..
2019-04-22 21:56:30 +02:00
2020-07-25 15:57:18 +02:00
2020-05-24 23:27:28 -03:00
2019-05-12 23:04:36 +02:00
2020-07-25 12:57:11 -03:00