mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
disable usage of T0 for RC30 in set_switchtime
This commit is contained in:
@@ -2498,13 +2498,15 @@ bool Thermostat::set_switchtime(const char * value, const uint16_t type_id, char
|
||||
data[1] = time;
|
||||
}
|
||||
|
||||
uint8_t min_on = 0;
|
||||
uint8_t max_on = 3;
|
||||
if ((model() == EMS_DEVICE_FLAG_RC35) || (model() == EMS_DEVICE_FLAG_RC30_N)) {
|
||||
max_on = 1;
|
||||
} else if (model() == EMS_DEVICE_FLAG_RC30) {
|
||||
min_on = 1;
|
||||
max_on = 4;
|
||||
}
|
||||
if (no > 41 || time > 0x90 || (on > max_on && on != 7)) {
|
||||
if (no > 41 || time > 0x90 || ((on < min_on || on > max_on) && on != 7)) {
|
||||
// LOG_WARNING(F("Setting switchtime: Invalid data: %s"), value);
|
||||
// LOG_WARNING(F("Setting switchtime: Invalid data: %02d.%1d.0x%02X.%1d"), no, day, time, on);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user