mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
roomctrl: disable rf_sensor, set type with controlmode
This commit is contained in:
@@ -1863,10 +1863,8 @@ bool Thermostat::set_remotetemp(const char * value, const int8_t id) {
|
|||||||
Roomctrl::set_remotetemp(Roomctrl::RC20, hc->hc(), hc->remotetemp); // RC20
|
Roomctrl::set_remotetemp(Roomctrl::RC20, hc->hc(), hc->remotetemp); // RC20
|
||||||
} else if ((model() == EMSdevice::EMS_DEVICE_FLAG_BC400) || model() == EMSdevice::EMS_DEVICE_FLAG_RC300) {
|
} else if ((model() == EMSdevice::EMS_DEVICE_FLAG_BC400) || model() == EMSdevice::EMS_DEVICE_FLAG_RC300) {
|
||||||
if (hc->control == 1) {
|
if (hc->control == 1) {
|
||||||
Roomctrl::set_remotetemp(Roomctrl::RC200, hc->hc(), hc->remotetemp); // RC200
|
Roomctrl::set_remotetemp(Roomctrl::RC200, hc->hc(), hc->remotetemp); // RC200
|
||||||
} else if (hc->control == 0) {
|
} else if (hc->control == 2 || hc->control == 3) { // RC100(2) and RC100H(3)
|
||||||
Roomctrl::set_remotetemp(Roomctrl::SENSOR, hc->hc(), hc->remotetemp); // RF Sensor
|
|
||||||
} else { // RC100(2) and RC100H(3)
|
|
||||||
Roomctrl::set_remotetemp(Roomctrl::RC100H, hc->hc(), hc->remotetemp); // RC100H
|
Roomctrl::set_remotetemp(Roomctrl::RC100H, hc->hc(), hc->remotetemp); // RC100H
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1986,6 +1984,9 @@ bool Thermostat::set_control(const char * value, const int8_t id) {
|
|||||||
} else if (model() == EMSdevice::EMS_DEVICE_FLAG_BC400 || model() == EMSdevice::EMS_DEVICE_FLAG_RC300 || model() == EMSdevice::EMS_DEVICE_FLAG_RC100) {
|
} else if (model() == EMSdevice::EMS_DEVICE_FLAG_BC400 || model() == EMSdevice::EMS_DEVICE_FLAG_RC300 || model() == EMSdevice::EMS_DEVICE_FLAG_RC100) {
|
||||||
if (Helpers::value2enum(value, ctrl, FL_(enum_control1))) {
|
if (Helpers::value2enum(value, ctrl, FL_(enum_control1))) {
|
||||||
write_command(hpmode_typeids[hc->hc()], 3, ctrl);
|
write_command(hpmode_typeids[hc->hc()], 3, ctrl);
|
||||||
|
if (hc->remotetemp != EMS_VALUE_SHORT_NOTSET && ctrl > 0) {
|
||||||
|
Roomctrl::set_remotetemp(ctrl == 1 ? Roomctrl::RC200 : Roomctrl::RC100H, hc->hc(), hc->remotetemp);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (Helpers::value2enum(value, ctrl, FL_(enum_control))) {
|
} else if (Helpers::value2enum(value, ctrl, FL_(enum_control))) {
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) {
|
|||||||
data[2] = 0xFF;
|
data[2] = 0xFF;
|
||||||
data[3] = 0;
|
data[3] = 0;
|
||||||
data[4] = 3;
|
data[4] = 3;
|
||||||
data[5] = 0x35;
|
data[5] = 0x35 + hc;
|
||||||
data[6] = (uint8_t)(remotetemp_[hc] >> 8);
|
data[6] = (uint8_t)(remotetemp_[hc] >> 8);
|
||||||
data[7] = (uint8_t)(remotetemp_[hc] & 0xFF);
|
data[7] = (uint8_t)(remotetemp_[hc] & 0xFF);
|
||||||
data[8] = EMSbus::calculate_crc(data, 8); // apppend CRC
|
data[8] = EMSbus::calculate_crc(data, 8); // apppend CRC
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.6.5-test.16"
|
#define EMSESP_APP_VERSION "3.6.5-test.16a"
|
||||||
|
|||||||
Reference in New Issue
Block a user