From d4ff98680abffbb6d1f52db61c1c18e215bde113 Mon Sep 17 00:00:00 2001 From: Tim Smeets Date: Thu, 7 Apr 2022 22:04:00 +0200 Subject: [PATCH] Add support for Electrolux heatpump and bump arduino-heatpumpir version (#3353) Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> --- esphome/components/heatpumpir/climate.py | 5 ++--- esphome/components/heatpumpir/heatpumpir.cpp | 1 + esphome/components/heatpumpir/heatpumpir.h | 1 + platformio.ini | 4 +--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/esphome/components/heatpumpir/climate.py b/esphome/components/heatpumpir/climate.py index 744ef5e527..a253a778de 100644 --- a/esphome/components/heatpumpir/climate.py +++ b/esphome/components/heatpumpir/climate.py @@ -25,6 +25,7 @@ PROTOCOLS = { "daikin_arc417": Protocol.PROTOCOL_DAIKIN_ARC417, "daikin_arc480": Protocol.PROTOCOL_DAIKIN_ARC480, "daikin": Protocol.PROTOCOL_DAIKIN, + "electroluxyal": Protocol.PROTOCOL_ELECTROLUXYAL, "fuego": Protocol.PROTOCOL_FUEGO, "fujitsu_awyz": Protocol.PROTOCOL_FUJITSU_AWYZ, "gree": Protocol.PROTOCOL_GREE, @@ -112,6 +113,4 @@ def to_code(config): cg.add(var.set_max_temperature(config[CONF_MAX_TEMPERATURE])) cg.add(var.set_min_temperature(config[CONF_MIN_TEMPERATURE])) - # PIO isn't updating releases, so referencing the release tag directly. See: - # https://github.com/ToniA/arduino-heatpumpir/commit/0948c619d86407a4e50e8db2f3c193e0576c86fd - cg.add_library("", "", "https://github.com/ToniA/arduino-heatpumpir.git#1.0.18") + cg.add_library("tonia/HeatpumpIR", "1.0.20") diff --git a/esphome/components/heatpumpir/heatpumpir.cpp b/esphome/components/heatpumpir/heatpumpir.cpp index ad3731b955..cd24411763 100644 --- a/esphome/components/heatpumpir/heatpumpir.cpp +++ b/esphome/components/heatpumpir/heatpumpir.cpp @@ -20,6 +20,7 @@ const std::map> PROTOCOL_CONSTRUCTOR_MAP {PROTOCOL_DAIKIN_ARC417, []() { return new DaikinHeatpumpARC417IR(); }}, // NOLINT {PROTOCOL_DAIKIN_ARC480, []() { return new DaikinHeatpumpARC480A14IR(); }}, // NOLINT {PROTOCOL_DAIKIN, []() { return new DaikinHeatpumpIR(); }}, // NOLINT + {PROTOCOL_ELECTROLUXYAL, []() { return new ElectroluxYALHeatpumpIR(); }}, // NOLINT {PROTOCOL_FUEGO, []() { return new FuegoHeatpumpIR(); }}, // NOLINT {PROTOCOL_FUJITSU_AWYZ, []() { return new FujitsuHeatpumpIR(); }}, // NOLINT {PROTOCOL_GREE, []() { return new GreeGenericHeatpumpIR(); }}, // NOLINT diff --git a/esphome/components/heatpumpir/heatpumpir.h b/esphome/components/heatpumpir/heatpumpir.h index 18d9b5040f..decf1eae07 100644 --- a/esphome/components/heatpumpir/heatpumpir.h +++ b/esphome/components/heatpumpir/heatpumpir.h @@ -20,6 +20,7 @@ enum Protocol { PROTOCOL_DAIKIN_ARC417, PROTOCOL_DAIKIN_ARC480, PROTOCOL_DAIKIN, + PROTOCOL_ELECTROLUXYAL, PROTOCOL_FUEGO, PROTOCOL_FUJITSU_AWYZ, PROTOCOL_GREE, diff --git a/platformio.ini b/platformio.ini index 8775b28156..bc2cddb9f7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -62,9 +62,7 @@ lib_deps = glmnet/Dsmr@0.5 ; dsmr rweather/Crypto@0.2.0 ; dsmr dudanov/MideaUART@1.1.8 ; midea - ; PIO isn't update releases correctly, see: - ; https://github.com/ToniA/arduino-heatpumpir/commit/0948c619d86407a4e50e8db2f3c193e0576c86fd - https://github.com/ToniA/arduino-heatpumpir.git#1.0.18 ; heatpumpir + tonia/HeatpumpIR@1.0.20 ; heatpumpir build_flags = ${common.build_flags} -DUSE_ARDUINO