From f1bc5d653993da776b077cf2c0cceeebcc65b1ab Mon Sep 17 00:00:00 2001 From: Danijel Tudek <21341606+danijelt@users.noreply.github.com> Date: Sun, 6 Aug 2023 23:32:38 +0200 Subject: [PATCH] add silent fan mode --- components/daikin_s21/climate/daikin_s21_climate.cpp | 6 +++++- components/daikin_s21/s21.cpp | 2 ++ components/daikin_s21/s21.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/components/daikin_s21/climate/daikin_s21_climate.cpp b/components/daikin_s21/climate/daikin_s21_climate.cpp index cc3cc30..cb59767 100644 --- a/components/daikin_s21/climate/daikin_s21_climate.cpp +++ b/components/daikin_s21/climate/daikin_s21_climate.cpp @@ -54,7 +54,7 @@ climate::ClimateTraits DaikinS21Climate::traits() { climate::CLIMATE_MODE_COOL, climate::CLIMATE_MODE_HEAT, climate::CLIMATE_MODE_FAN_ONLY, climate::CLIMATE_MODE_DRY}); - traits.set_supported_custom_fan_modes({"Automatic", "1", "2", "3", "4", "5"}); + traits.set_supported_custom_fan_modes({"Automatic", "Silent", "1", "2", "3", "4", "5"}); traits.set_supported_swing_modes({ climate::CLIMATE_SWING_OFF, @@ -232,6 +232,8 @@ const std::string DaikinS21Climate::d2e_fan_mode(DaikinFanMode mode) { return "4"; case DaikinFanMode::Speed5: return "5"; + case DaikinFanMode::Silent: + return "Silent"; case DaikinFanMode::Auto: default: return "Automatic"; @@ -241,6 +243,8 @@ const std::string DaikinS21Climate::d2e_fan_mode(DaikinFanMode mode) { DaikinFanMode DaikinS21Climate::e2d_fan_mode(std::string mode) { if (mode == "Automatic") return DaikinFanMode::Auto; + if (mode == "Silent") + return DaikinFanMode::Silent; if (mode == "1") return DaikinFanMode::Speed1; if (mode == "2") diff --git a/components/daikin_s21/s21.cpp b/components/daikin_s21/s21.cpp index 0fe50c2..9cf5976 100644 --- a/components/daikin_s21/s21.cpp +++ b/components/daikin_s21/s21.cpp @@ -37,6 +37,8 @@ std::string daikin_fan_mode_to_string(DaikinFanMode mode) { switch (mode) { case DaikinFanMode::Auto: return "Auto"; + case DaikinFanMode::Silent: + return "Silent"; case DaikinFanMode::Speed1: return "1"; case DaikinFanMode::Speed2: diff --git a/components/daikin_s21/s21.h b/components/daikin_s21/s21.h index a725622..9004f96 100644 --- a/components/daikin_s21/s21.h +++ b/components/daikin_s21/s21.h @@ -17,6 +17,7 @@ enum class DaikinClimateMode : uint8_t { enum class DaikinFanMode : uint8_t { Auto = 'A', + Silent = 'B', Speed1 = '3', Speed2 = '4', Speed3 = '5',