Merge pull request #36 from ElVit/heatpump/new_controls

This commit is contained in:
ElVit 2026-08-05 21:22:04 +02:00 committed by GitHub
commit dd48334147
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 64 additions and 2 deletions

View File

@ -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

View File

@ -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) {

View File

@ -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 {
@ -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
@ -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
};
};

View File

@ -51,6 +51,8 @@ CONF_SET36 = "set36" # Set Bivalent Start Temp
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,
@ -87,6 +89,8 @@ TYPES = [
CONF_SET37,
CONF_SET38,
CONF_SET46,
CONF_SET47,
CONF_SET48,
]
@ -264,6 +268,14 @@ CONFIG_SCHEMA = 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)

View File

@ -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;
};
@ -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;
};

View File

@ -42,6 +42,8 @@ enum NumberIds : uint8_t {
CONF_SET37,
CONF_SET38,
CONF_SET46,
CONF_SET47,
CONF_SET48,
};
class PanasonicHeatpumpNumber : public number::Number,

View File

@ -392,6 +392,8 @@ text_sensor:
name: "SmartDHW"
top141:
name: "Quiet Mode Priority"
top143:
name: "DHW Sensor Selection"
number:
- platform: panasonic_heatpump
@ -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
@ -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
@ -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