From 4d42e21e6afe86aa1380edb3e9859d57c0785634 Mon Sep 17 00:00:00 2001 From: GrKoR Date: Wed, 11 Jan 2023 18:35:12 +0400 Subject: [PATCH] =?UTF-8?q?v.0.2.9-dev.3:=C2=A0power=20limitation=20enable?= =?UTF-8?q?=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/aux_ac/aux_ac.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/aux_ac/aux_ac.h b/components/aux_ac/aux_ac.h index b658060..7749269 100644 --- a/components/aux_ac/aux_ac.h +++ b/components/aux_ac/aux_ac.h @@ -1667,12 +1667,8 @@ class AirCon : public esphome::Component, public esphome::climate::Climate { } // ограничение мощности инвертора - if (cmd->inverter_power_limitation_enable) { - pack->body[13] = (pack->body[13] & ~AC_INVERTER_POWER_LIMITATION_ENABLE_MASK) | (1 << 7); - } else { - pack->body[13] = (pack->body[13] & ~AC_INVERTER_POWER_LIMITATION_ENABLE_MASK) | 0; - } if (cmd->inverter_power_limitation_value != AC_INVERTER_POWER_LIMITATION_VALUE_UNTOUCHED) { + pack->body[13] = (pack->body[13] & ~AC_INVERTER_POWER_LIMITATION_ENABLE_MASK) | (cmd->inverter_power_limitation_enable << 7); cmd->inverter_power_limitation_value = _power_limitation_value_normalise(cmd->inverter_power_limitation_value); pack->body[13] = (pack->body[13] & ~AC_INVERTER_POWER_LIMITATION_VALUE_MASK) | cmd->inverter_power_limitation_value; }