From b777730d70ad38922cfec487c50d638fa45c9acc Mon Sep 17 00:00:00 2001 From: Brokly Date: Fri, 27 May 2022 07:46:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D0=B2=D0=BD=D0=B5=D1=88=D0=BD=D0=B5=D0=B9?= =?UTF-8?q?=20=D1=82=D0=B5=D0=BC=D0=BF=D0=B5=D1=80=D0=B0=D1=82=D1=83=D1=80?= =?UTF-8?q?=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/aux_ac/aux_ac.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/aux_ac/aux_ac.h b/components/aux_ac/aux_ac.h index e8efa3e..1738976 100644 --- a/components/aux_ac/aux_ac.h +++ b/components/aux_ac/aux_ac.h @@ -1314,10 +1314,10 @@ class AirCon : public esphome::Component, public esphome::climate::Climate { // temp = big_info_body->outdoor_temperature - 0x20; // фильтруем простейшим фильтром OUTDOOR_FILTER_PESCENT - взнос одного измерения в процентах { - const float koef = ((float)OUTDOOR_FILTER_PESCENT)/100; - const float antkoef = 1.0 - koef; - static float temp = _current_ac_state.temp_outdoor; - temp = temp * antkoef + koef * (big_info_body->outdoor_temperature - 0x20); + const float koef = ((float)OUTDOOR_FILTER_PESCENT); + const float antkoef = 100 - koef; + static float temp = _current_ac_state.temp_outdoor*100; + temp = (temp * antkoef + koef * (big_info_body->outdoor_temperature - 0x20))/100; stateChangedFlag = stateChangedFlag || (_current_ac_state.temp_outdoor != temp); _current_ac_state.temp_outdoor = temp; }