mirror of
https://github.com/geoffdavis/esphome-mitsubishiheatpump
synced 2024-08-30 18:12:13 +00:00
Merge branch master into develop
This commit is contained in:
commit
4d5f99807e
@ -239,7 +239,7 @@ climate:
|
|||||||
hardware_uart: UART2
|
hardware_uart: UART2
|
||||||
baud_rate: 9600
|
baud_rate: 9600
|
||||||
supports:
|
supports:
|
||||||
mode: [AUTO, COOL, HEAT, FAN_ONLY]
|
mode: [HEAT_COOL, COOL, HEAT, FAN_ONLY]
|
||||||
fan_mode: [AUTO, LOW, MEDIUM, HIGH]
|
fan_mode: [AUTO, LOW, MEDIUM, HIGH]
|
||||||
swing_mode: [OFF, VERTICAL]
|
swing_mode: [OFF, VERTICAL]
|
||||||
visual:
|
visual:
|
||||||
@ -261,7 +261,7 @@ climate:
|
|||||||
is 9 seconds due to underlying issues with the HeatPump library. Default: 500ms
|
is 9 seconds due to underlying issues with the HeatPump library. Default: 500ms
|
||||||
* *supports* (_Optional_): Supported features for the device. ** *mode*
|
* *supports* (_Optional_): Supported features for the device. ** *mode*
|
||||||
(_Optional_, list): Supported climate modes for the HeatPump. Default:
|
(_Optional_, list): Supported climate modes for the HeatPump. Default:
|
||||||
`['AUTO', 'COOL', 'HEAT', 'DRY', 'FAN_ONLY']`
|
`['HEAT_COOL', 'COOL', 'HEAT', 'DRY', 'FAN_ONLY']`
|
||||||
** *fan_mode* (_Optional_, list):
|
** *fan_mode* (_Optional_, list):
|
||||||
Supported fan speeds for the HeatPump. Default: `['AUTO', 'DIFFUSE', 'LOW',
|
Supported fan speeds for the HeatPump. Default: `['AUTO', 'DIFFUSE', 'LOW',
|
||||||
'MEDIUM', 'MIDDLE', 'HIGH']` ** *swing_mode* (_Optional_, list): Supported
|
'MEDIUM', 'MIDDLE', 'HIGH']` ** *swing_mode* (_Optional_, list): Supported
|
||||||
|
@ -16,7 +16,7 @@ from esphome.core import CORE, coroutine
|
|||||||
AUTO_LOAD = ["climate"]
|
AUTO_LOAD = ["climate"]
|
||||||
|
|
||||||
CONF_SUPPORTS = "supports"
|
CONF_SUPPORTS = "supports"
|
||||||
DEFAULT_CLIMATE_MODES = ['AUTO', 'COOL', 'HEAT', 'DRY', 'FAN_ONLY']
|
DEFAULT_CLIMATE_MODES = ['HEAT_COOL', 'COOL', 'HEAT', 'DRY', 'FAN_ONLY']
|
||||||
DEFAULT_FAN_MODES = ['AUTO', 'DIFFUSE', 'LOW', 'MEDIUM', 'MIDDLE', 'HIGH']
|
DEFAULT_FAN_MODES = ['AUTO', 'DIFFUSE', 'LOW', 'MEDIUM', 'MIDDLE', 'HIGH']
|
||||||
DEFAULT_SWING_MODES = ['OFF', 'VERTICAL']
|
DEFAULT_SWING_MODES = ['OFF', 'VERTICAL']
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ void MitsubishiHeatPump::control(const climate::ClimateCall &call) {
|
|||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case climate::CLIMATE_MODE_AUTO:
|
case climate::CLIMATE_MODE_HEAT_COOL:
|
||||||
hp->setModeSetting("AUTO");
|
hp->setModeSetting("AUTO");
|
||||||
hp->setPowerSetting("ON");
|
hp->setPowerSetting("ON");
|
||||||
if (has_mode){
|
if (has_mode){
|
||||||
@ -291,7 +291,7 @@ void MitsubishiHeatPump::hpSettingsChanged() {
|
|||||||
this->mode = climate::CLIMATE_MODE_FAN_ONLY;
|
this->mode = climate::CLIMATE_MODE_FAN_ONLY;
|
||||||
this->action = climate::CLIMATE_ACTION_FAN;
|
this->action = climate::CLIMATE_ACTION_FAN;
|
||||||
} else if (strcmp(currentSettings.mode, "AUTO") == 0) {
|
} else if (strcmp(currentSettings.mode, "AUTO") == 0) {
|
||||||
this->mode = climate::CLIMATE_MODE_AUTO;
|
this->mode = climate::CLIMATE_MODE_HEAT_COOL;
|
||||||
if (auto_setpoint != currentSettings.temperature) {
|
if (auto_setpoint != currentSettings.temperature) {
|
||||||
auto_setpoint = currentSettings.temperature;
|
auto_setpoint = currentSettings.temperature;
|
||||||
save(currentSettings.temperature, auto_storage);
|
save(currentSettings.temperature, auto_storage);
|
||||||
@ -378,7 +378,7 @@ void MitsubishiHeatPump::hpStatusChanged(heatpumpStatus currentStatus) {
|
|||||||
this->action = climate::CLIMATE_ACTION_IDLE;
|
this->action = climate::CLIMATE_ACTION_IDLE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case climate::CLIMATE_MODE_AUTO:
|
case climate::CLIMATE_MODE_HEAT_COOL:
|
||||||
this->action = climate::CLIMATE_ACTION_IDLE;
|
this->action = climate::CLIMATE_ACTION_IDLE;
|
||||||
if (currentStatus.operating) {
|
if (currentStatus.operating) {
|
||||||
if (this->current_temperature > this->target_temperature) {
|
if (this->current_temperature > this->target_temperature) {
|
||||||
@ -428,6 +428,10 @@ void MitsubishiHeatPump::setup() {
|
|||||||
|
|
||||||
ESP_LOGCONFIG(TAG, "Intializing new HeatPump object.");
|
ESP_LOGCONFIG(TAG, "Intializing new HeatPump object.");
|
||||||
this->hp = new HeatPump();
|
this->hp = new HeatPump();
|
||||||
|
this->current_temperature = NAN;
|
||||||
|
this->target_temperature = NAN;
|
||||||
|
this->fan_mode = climate::CLIMATE_FAN_OFF;
|
||||||
|
this->swing_mode = climate::CLIMATE_SWING_OFF;
|
||||||
|
|
||||||
#ifdef USE_CALLBACKS
|
#ifdef USE_CALLBACKS
|
||||||
hp->setSettingsChangedCallback(
|
hp->setSettingsChangedCallback(
|
||||||
|
Loading…
Reference in New Issue
Block a user