Use heat mode for heat. Move EXT HT to custom presets. (#3437)

* Use heat mode for heat. Move EXT HT to custom presets.

* Fix syntax error.
This commit is contained in:
James Szalay 2022-05-11 23:26:14 -04:00 committed by GitHub
parent c2aaae4818
commit 01c4d3c225
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -117,7 +117,7 @@ void Bedjet::control(const ClimateCall &call) {
pkt = this->codec_->get_button_request(BTN_OFF);
break;
case climate::CLIMATE_MODE_HEAT:
pkt = this->codec_->get_button_request(BTN_EXTHT);
pkt = this->codec_->get_button_request(BTN_HEAT);
break;
case climate::CLIMATE_MODE_FAN_ONLY:
pkt = this->codec_->get_button_request(BTN_COOL);
@ -137,7 +137,7 @@ void Bedjet::control(const ClimateCall &call) {
} else {
this->force_refresh_ = true;
this->mode = mode;
// We're using (custom) preset for Turbo & M1-3 presets, so changing climate mode will clear those
// We're using (custom) preset for Turbo, EXT HT, & M1-3 presets, so changing climate mode will clear those
this->custom_preset.reset();
this->preset.reset();
}
@ -186,6 +186,8 @@ void Bedjet::control(const ClimateCall &call) {
pkt = this->codec_->get_button_request(BTN_M2);
} else if (preset == "M3") {
pkt = this->codec_->get_button_request(BTN_M3);
} else if (preset == "EXT HT") {
pkt = this->codec_->get_button_request(BTN_EXTHT);
} else {
ESP_LOGW(TAG, "Unsupported preset: %s", preset.c_str());
return;

View file

@ -67,6 +67,8 @@ class Bedjet : public climate::Climate, public esphome::ble_client::BLEClientNod
// We could fetch biodata from bedjet and set these names that way.
// But then we have to invert the lookup in order to send the right preset.
// For now, we can leave them as M1-3 to match the remote buttons.
// EXT HT added to match remote button.
"EXT HT",
"M1",
"M2",
"M3",