From cb2bddb41c53d6732e2473d613179dc116d1fd7b Mon Sep 17 00:00:00 2001 From: Martin Tome Date: Thu, 29 Aug 2024 21:14:55 -0300 Subject: [PATCH] Add Support for PHS32 HeatPump --- esphome/components/heatpumpir/climate.py | 3 ++- esphome/components/heatpumpir/heatpumpir.cpp | 1 + esphome/components/heatpumpir/heatpumpir.h | 1 + platformio.ini | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/esphome/components/heatpumpir/climate.py b/esphome/components/heatpumpir/climate.py index 9d31668deb..f8cb79f6a3 100644 --- a/esphome/components/heatpumpir/climate.py +++ b/esphome/components/heatpumpir/climate.py @@ -70,6 +70,7 @@ PROTOCOLS = { "airway": Protocol.PROTOCOL_AIRWAY, "bgh_aud": Protocol.PROTOCOL_BGH_AUD, "panasonic_altdke": Protocol.PROTOCOL_PANASONIC_ALTDKE, + "philco_phs32": Protocol.PROTOCOL_PHILCO_PHS32, "vaillantvai8": Protocol.PROTOCOL_VAILLANTVAI8, "r51m": Protocol.PROTOCOL_R51M, } @@ -127,6 +128,6 @@ def to_code(config): cg.add(var.set_max_temperature(config[CONF_MAX_TEMPERATURE])) cg.add(var.set_min_temperature(config[CONF_MIN_TEMPERATURE])) - cg.add_library("tonia/HeatpumpIR", "1.0.27") + cg.add_library("tonia/HeatpumpIR", "1.0.29") if CORE.is_libretiny: CORE.add_platformio_option("lib_ignore", "IRremoteESP8266") diff --git a/esphome/components/heatpumpir/heatpumpir.cpp b/esphome/components/heatpumpir/heatpumpir.cpp index 144dcc9bfa..3fbab3c16c 100644 --- a/esphome/components/heatpumpir/heatpumpir.cpp +++ b/esphome/components/heatpumpir/heatpumpir.cpp @@ -64,6 +64,7 @@ const std::map> PROTOCOL_CONSTRUCTOR_MAP {PROTOCOL_AIRWAY, []() { return new AIRWAYHeatpumpIR(); }}, // NOLINT {PROTOCOL_BGH_AUD, []() { return new BGHHeatpumpIR(); }}, // NOLINT {PROTOCOL_PANASONIC_ALTDKE, []() { return new PanasonicAltDKEHeatpumpIR(); }}, // NOLINT + {PROTOCOL_PHILCO_PHS32, []() { return new PhilcoPHS32HeatpumpIR(); }}, // NOLINT {PROTOCOL_VAILLANTVAI8, []() { return new VaillantHeatpumpIR(); }}, // NOLINT {PROTOCOL_R51M, []() { return new R51MHeatpumpIR(); }}, // NOLINT }; diff --git a/esphome/components/heatpumpir/heatpumpir.h b/esphome/components/heatpumpir/heatpumpir.h index f6e7ff3cd6..592749a330 100644 --- a/esphome/components/heatpumpir/heatpumpir.h +++ b/esphome/components/heatpumpir/heatpumpir.h @@ -64,6 +64,7 @@ enum Protocol { PROTOCOL_AIRWAY, PROTOCOL_BGH_AUD, PROTOCOL_PANASONIC_ALTDKE, + PROTOCOL_PHILCO_PHS32, PROTOCOL_VAILLANTVAI8, PROTOCOL_R51M, }; diff --git a/platformio.ini b/platformio.ini index 147159a841..7ab8f71fc1 100644 --- a/platformio.ini +++ b/platformio.ini @@ -67,7 +67,7 @@ lib_deps = glmnet/Dsmr@0.7 ; dsmr rweather/Crypto@0.4.0 ; dsmr dudanov/MideaUART@1.1.9 ; midea - tonia/HeatpumpIR@1.0.27 ; heatpumpir + tonia/HeatpumpIR@1.0.29 ; heatpumpir build_flags = ${common.build_flags} -DUSE_ARDUINO