mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-03-14 05:36:34 +03:00
fix SRC mode setting from HA #2960
This commit is contained in:
@@ -211,13 +211,14 @@ bool Connect::set_mode(const char * value, const int8_t id) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
uint8_t v;
|
uint8_t v;
|
||||||
if (Helpers::value2enum(value, v, FL_(enum_mode2), {3, 1, 0})) {
|
if (!Helpers::value2enum(value, v, FL_(enum_mode2), {3, 1, 0})) {
|
||||||
// if (Helpers::value2enum(value, v, FL_(enum_mode8))) {
|
if (!Helpers::value2enum(value, v, FL_(enum_mode_ha), {3, 1, 0})) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
write_command(0xBB5 + rc->room(), 0, v); // no validate, mode change is broadcasted
|
write_command(0xBB5 + rc->room(), 0, v); // no validate, mode change is broadcasted
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Connect::set_seltemp(const char * value, const int8_t id) {
|
bool Connect::set_seltemp(const char * value, const int8_t id) {
|
||||||
auto rc = room_circuit(id - DeviceValueTAG::TAG_SRC1);
|
auto rc = room_circuit(id - DeviceValueTAG::TAG_SRC1);
|
||||||
|
|||||||
Reference in New Issue
Block a user