From fe38b36c265f88702d301f569a1e197ea081196f Mon Sep 17 00:00:00 2001 From: Chris Feenstra <73584137+cfeenstra1024@users.noreply.github.com> Date: Wed, 12 Oct 2022 04:29:57 +0200 Subject: [PATCH] Add support for ZHLT01 heatpump IR protocol (#3655) Co-authored-by: Chris Feenstra --- esphome/components/heatpumpir/climate.py | 1 + esphome/components/heatpumpir/heatpumpir.cpp | 1 + esphome/components/heatpumpir/heatpumpir.h | 1 + 3 files changed, 3 insertions(+) diff --git a/esphome/components/heatpumpir/climate.py b/esphome/components/heatpumpir/climate.py index a253a778de..2e78db8356 100644 --- a/esphome/components/heatpumpir/climate.py +++ b/esphome/components/heatpumpir/climate.py @@ -58,6 +58,7 @@ PROTOCOLS = { "sharp": Protocol.PROTOCOL_SHARP, "toshiba_daiseikai": Protocol.PROTOCOL_TOSHIBA_DAISEIKAI, "toshiba": Protocol.PROTOCOL_TOSHIBA, + "zhlt01": Protocol.PROTOCOL_ZHLT01, } CONF_HORIZONTAL_DEFAULT = "horizontal_default" diff --git a/esphome/components/heatpumpir/heatpumpir.cpp b/esphome/components/heatpumpir/heatpumpir.cpp index cd24411763..bed1dc76c0 100644 --- a/esphome/components/heatpumpir/heatpumpir.cpp +++ b/esphome/components/heatpumpir/heatpumpir.cpp @@ -53,6 +53,7 @@ const std::map> PROTOCOL_CONSTRUCTOR_MAP {PROTOCOL_SHARP, []() { return new SharpHeatpumpIR(); }}, // NOLINT {PROTOCOL_TOSHIBA_DAISEIKAI, []() { return new ToshibaDaiseikaiHeatpumpIR(); }}, // NOLINT {PROTOCOL_TOSHIBA, []() { return new ToshibaHeatpumpIR(); }}, // NOLINT + {PROTOCOL_ZHLT01, []() { return new ZHLT01HeatpumpIR(); }}, // NOLINT }; void HeatpumpIRClimate::setup() { diff --git a/esphome/components/heatpumpir/heatpumpir.h b/esphome/components/heatpumpir/heatpumpir.h index decf1eae07..c60b944111 100644 --- a/esphome/components/heatpumpir/heatpumpir.h +++ b/esphome/components/heatpumpir/heatpumpir.h @@ -53,6 +53,7 @@ enum Protocol { PROTOCOL_SHARP, PROTOCOL_TOSHIBA_DAISEIKAI, PROTOCOL_TOSHIBA, + PROTOCOL_ZHLT01, }; // Simple enum to represent horizontal directios