diff --git a/components/panasonic_heatpump/commands.cpp b/components/panasonic_heatpump/commands.cpp index 3ad5bdb..b4daff3 100644 --- a/components/panasonic_heatpump/commands.cpp +++ b/components/panasonic_heatpump/commands.cpp @@ -90,16 +90,16 @@ namespace esphome { switch (input) { - case 0: return 0b010010; // 0x12 = heat - case 1: return 0b100001; // 0x21 = tank + case 0: return 0b100001; // 0x21 = tank + case 1: return 0b010010; // 0x12 = heat case 2: return 0b100010; // 0x22 = heat+tank case 3: return 0b010011; // 0x13 = cool case 4: return 0b100011; // 0x23 = cool+tank case 5: return 0b011000; // 0x18 = auto - case 6: return 0b011001; // 0x19 = auto-heat - case 7: return 0b101000; // 0x28 = auto-tank - case 8: return 0b011010; // 0x1A = auto-cool - case 9: return 0b101001; // 0x29 = auto-heat+tank + case 6: return 0b101000; // 0x28 = auto+tank + case 7: return 0b011001; // 0x19 = auto-heat + case 8: return 0b101001; // 0x29 = auto-heat+tank + case 9: return 0b011010; // 0x1A = auto-cool case 10: return 0b101010; // 0x2A = auto-cool+tank default: return 0; // do nothing } diff --git a/components/panasonic_heatpump/decode.cpp b/components/panasonic_heatpump/decode.cpp index 491c73b..1769fe5 100644 --- a/components/panasonic_heatpump/decode.cpp +++ b/components/panasonic_heatpump/decode.cpp @@ -185,16 +185,16 @@ namespace esphome { switch ((int)(input & 0b111111)) { - case 0b010010: return 0; // 0x12 = heat - case 0b100001: return 1; // 0x21 = tank + case 0b100001: return 0; // 0x21 = tank + case 0b010010: return 1; // 0x12 = heat case 0b100010: return 2; // 0x22 = heat+tank case 0b010011: return 3; // 0x13 = cool case 0b100011: return 4; // 0x23 = cool+tank case 0b011000: return 5; // 0x18 = auto - case 0b011001: return 6; // 0x19 = auto-heat - case 0b101000: return 7; // 0x28 = auto-tank - case 0b011010: return 8; // 0x1A = auto-cool - case 0b101001: return 9; // 0x29 = auto-heat+tank + case 0b101000: return 6; // 0x28 = auto-tank + case 0b011001: return 7; // 0x19 = auto-heat + case 0b101001: return 8; // 0x29 = auto-heat+tank + case 0b011010: return 9; // 0x1A = auto-cool case 0b101010: return 10; // 0x2A = auto-cool+tank default: return -1; // unknown } diff --git a/components/panasonic_heatpump/decode.h b/components/panasonic_heatpump/decode.h index b4d93ba..ae088a9 100644 --- a/components/panasonic_heatpump/decode.h +++ b/components/panasonic_heatpump/decode.h @@ -66,8 +66,8 @@ namespace esphome static const constexpr char* const PowerfulMode[] = { "4", "Off", "30min", "60min", "90min" }; static const constexpr char* const OperationMode[] = { - "11", "HEAT", "TANK", "HEAT+TANK", "COOL", "COOL+TANK", "AUTO", - "AUTO(HEAT)", "AUTO(TANK)", "AUTO(COOL)", "AUTO(HEAT)+TANK", "AUTO(COOL)+TANK" + "11", "TANK", "HEAT", "HEAT+TANK", "COOL", "COOL+TANK", "AUTO", "AUTO+TANK", + "AUTO(HEAT)", "AUTO(HEAT)+TANK", "AUTO(COOL)", "AUTO(COOL)+TANK" }; static const constexpr char* const ZoneState[] = { "3", "Zone 1", "Zone 2", "Zone 1 & 2" }; static const constexpr char* const ExtPadHeaterType[] = { "3", "Disabled", "Type-A", "Type-B" };