Skip to content

Commit

Permalink
add silent fan mode
Browse files Browse the repository at this point in the history
  • Loading branch information
danijelt committed Aug 14, 2023
1 parent 0aabc8e commit 7c890ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/daikin_s21/climate/daikin_s21_climate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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";
Expand All @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions components/daikin_s21/s21.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions components/daikin_s21/s21.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ enum class DaikinClimateMode : uint8_t {

enum class DaikinFanMode : uint8_t {
Auto = 'A',
Silent = 'B',
Speed1 = '3',
Speed2 = '4',
Speed3 = '5',
Expand Down

0 comments on commit 7c890ee

Please sign in to comment.