Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions components/panasonic_heatpump/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,10 @@ number:
name: "Set Bivalent AP Stop Temp"
set46:
name: "Set Heater On Outdoor Temp"
set47:
name: "Set Heat To Cool Temp"
set48:
name: "Set Cool To Heat Temp"
```

### Switches
Expand Down
6 changes: 6 additions & 0 deletions components/panasonic_heatpump/decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ constexpr const uint8_t KnownModels[NUMBER_OF_MODELS][10] = {
{0xE2, 0xD5, 0x0C, 0x29, 0x99, 0x83, 0x92, 0x0C, 0x29, 0x98}, // 64
{0x62, 0xD2, 0x0B, 0x45, 0x54, 0x42, 0xD2, 0x0B, 0x72, 0x66}, // 65
{0xE2, 0xCF, 0x0B, 0x82, 0x09, 0x12, 0xD0, 0x0B, 0x10, 0x11}, // 66
{0x42, 0xD4, 0x0B, 0x83, 0x71, 0x32, 0xD2, 0x0C, 0x45, 0x55}, // 67
{0x12, 0xD7, 0x0B, 0x47, 0x19, 0x37, 0x94, 0x0E, 0x83, 0x10}, // 68
{0xE2, 0xD5, 0x0D, 0x00, 0x09, 0x43, 0xD6, 0x0E, 0x07, 0x09}, // 69
{0xE2, 0xCF, 0x0B, 0x84, 0x05, 0x12, 0xD0, 0x0B, 0x93, 0x05}, // 70
{0xE2, 0xD5, 0x0B, 0x35, 0x99, 0x83, 0x92, 0x0D, 0x29, 0x98}, // 71
{0x12, 0xD7, 0x0B, 0x98, 0x14, 0x35, 0x94, 0x0D, 0x83, 0x10}, // 72
};

int PanasonicDecode::getBit1(uint8_t input) {
Expand Down
10 changes: 8 additions & 2 deletions components/panasonic_heatpump/decode.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define RESPONSE_MSG_SIZE 203
#endif
#ifndef NUMBER_OF_MODELS
#define NUMBER_OF_MODELS 67
#define NUMBER_OF_MODELS 73
#endif

namespace esphome {
Expand Down Expand Up @@ -72,7 +72,7 @@ class PanasonicDecode {
static const constexpr char* const QuietModePriority[] = {"2", "Sound", "Capacity"};
static const constexpr char* const DHWSensorSelection[] = {"2", "Top", "Center"};
static const constexpr char* const ModelNames[] = {
"67", // string representation of number of known models (last model number + 1)
"73", // string representation of number of known models (last model number + 1)
"WH-MDC05H3E5", // 0
"WH-MDC07H3E5", // 1
"IDU:WH-SXC09H3E5, ODU:WH-UX09HE5", // 2
Expand Down Expand Up @@ -140,6 +140,12 @@ class PanasonicDecode {
"IDU:WH-ADC0509L3E5, ODU:WH-WDG09LE5", // 64
"IDU:WH-ADC0309J3E5, ODU:WH-UD09JE5-1", // 65
"IDU:WH-SDC12H6E5, ODU:WH-UD12HE5", // 66
"IDU:WH-ADC0309J3E5C, ODU:WH-UD05JE5", // 67
"IDU:WH-ADC0316M9E83, ODU:WH-WXG09ME8", // 68
"IDU:WH-SDC09K3E8, ODU:WH-UDZ09KE8", // 69
"IDU:WH-SQC16H9E8, ODU:WH-UQ16HE8", // 70
"IDU:WH-SDC0509L6E5, ODU:WH-WDG09LE5", // 71
"IDU:WH-SDC0316M9E8, ODU:WH-WXG09ME8", // 72
};
};

Expand Down
12 changes: 12 additions & 0 deletions components/panasonic_heatpump/number/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
CONF_SET37 = "set37" # Set Bivalent AP Start Temp
CONF_SET38 = "set38" # Set Bivalent AP Stop Temp
CONF_SET46 = "set46" # Set Heater On Outdoor Temp
CONF_SET47 = "set47" # Set Heat To Cool Temp
CONF_SET48 = "set48" # Set Cool To Heat Temp

TYPES = [
CONF_SET5,
Expand Down Expand Up @@ -87,6 +89,8 @@
CONF_SET37,
CONF_SET38,
CONF_SET46,
CONF_SET47,
CONF_SET48,
]


Expand Down Expand Up @@ -264,6 +268,14 @@ def number_options(min_val, max_val, step) -> cv.Schema:
PanasonicHeatpumpNumber,
unit_of_measurement=UNIT_CELSIUS,
).extend(number_options(-15.0, 20.0, 1.0)),
cv.Optional(CONF_SET47): number.number_schema(
PanasonicHeatpumpNumber,
unit_of_measurement=UNIT_CELSIUS,
).extend(number_options(11.0, 25.0, 1.0)),
cv.Optional(CONF_SET48): number.number_schema(
PanasonicHeatpumpNumber,
unit_of_measurement=UNIT_CELSIUS,
).extend(number_options(5.0, 14.0, 1.0)),
}
).extend(cv.COMPONENT_SCHEMA)

Expand Down
16 changes: 16 additions & 0 deletions components/panasonic_heatpump/number/panasonic_heatpump_number.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ void PanasonicHeatpumpNumber::control(float value) {
case NumberIds::CONF_SET46:
this->parent_->set_command_byte(PanasonicCommand::setPlus128(value_int), 85);
break;
case NumberIds::CONF_SET47:
this->parent_->set_command_byte(PanasonicCommand::setPlus128(value_int), 95);
break;
case NumberIds::CONF_SET48:
this->parent_->set_command_byte(PanasonicCommand::setPlus128(value_int), 96);
break;
default:
return;
};
Expand Down Expand Up @@ -302,6 +308,16 @@ void PanasonicHeatpumpNumber::publish_new_state(const std::vector<uint8_t>& data
if (this->has_state() && this->state == new_state)
return;
break;
case NumberIds::CONF_SET47:
new_state = PanasonicDecode::getByteMinus128(data[95]);
if (this->has_state() && this->state == new_state)
return;
break;
case NumberIds::CONF_SET48:
new_state = PanasonicDecode::getByteMinus128(data[96]);
if (this->has_state() && this->state == new_state)
return;
break;
default:
return;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ enum NumberIds : uint8_t {
CONF_SET37,
CONF_SET38,
CONF_SET46,
CONF_SET47,
CONF_SET48,
};

class PanasonicHeatpumpNumber : public number::Number,
Expand Down
16 changes: 16 additions & 0 deletions example_panasonic_heatpump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ text_sensor:
name: "SmartDHW"
top141:
name: "Quiet Mode Priority"
top143:
name: "DHW Sensor Selection"

number:
- platform: panasonic_heatpump
Expand Down Expand Up @@ -461,6 +463,12 @@ number:
name: "Set Bivalent AP Start Temp"
set38:
name: "Set Bivalent AP Stop Temp"
set46:
name: "Set Heater On Outdoor Temp"
set47:
name: "Set Heat To Cool Temp"
set48:
name: "Set Cool To Heat Temp"

switch:
- platform: panasonic_heatpump
Expand Down Expand Up @@ -490,6 +498,8 @@ switch:
name: "Set External Heat Cool Control"
set34:
name: "Set Bivalent Control"
error_reset:
name: "Error Reset (Restart Heatpump)"

select:
- platform: panasonic_heatpump
Expand All @@ -516,6 +526,12 @@ select:
name: "Set Quiet Mode Priority"
set42:
name: "Set Pump Flow Rate Mode"
set43:
name: "Set DHW Sensor Selection"
set44:
name: "Set DHW Heater State"
set45:
name: "Set Room Heater State"

climate:
- platform: panasonic_heatpump
Expand Down
Loading