mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
Zigbee fix compilation for future core (#18432)
* Zigbee fix compilation for future core * More fixes for ESP32
This commit is contained in:
parent
7f9f08fa87
commit
e2e142f289
@ -1302,9 +1302,15 @@ void ZCLFrame::syntheticAqaraCubeOrButton(class Z_attribute_list &attr_list, cla
|
||||
|
||||
if (modelId.startsWith(F("lumi.sensor_cube"))) { // only for Aqara cube
|
||||
int32_t val = attr.getInt();
|
||||
#ifdef ESP8266
|
||||
const __FlashStringHelper *aqara_cube = F("AqaraCube");
|
||||
const __FlashStringHelper *aqara_cube_side = F("AqaraCubeSide");
|
||||
const __FlashStringHelper *aqara_cube_from_side = F("AqaraCubeFromSide");
|
||||
#else
|
||||
const char *aqara_cube = "AqaraCube";
|
||||
const char *aqara_cube_side = "AqaraCubeSide";
|
||||
const char *aqara_cube_from_side = "AqaraCubeFromSide";
|
||||
#endif
|
||||
|
||||
switch (val) {
|
||||
case 0:
|
||||
@ -1355,8 +1361,13 @@ void ZCLFrame::syntheticAqaraCubeOrButton(class Z_attribute_list &attr_list, cla
|
||||
// presentValue = x + 512 = double tap while side x is on top
|
||||
} else if (modelId.startsWith(F("lumi.remote")) || modelId.startsWith(F("lumi.sensor_swit"))) { // only for Aqara buttons WXKG11LM & WXKG12LM, 'swit' because of #9923
|
||||
int32_t val = attr.getInt();
|
||||
#ifdef ESP8266
|
||||
const __FlashStringHelper *aqara_click = F("click"); // deprecated
|
||||
const __FlashStringHelper *aqara_action = F("action"); // deprecated
|
||||
#else
|
||||
const char *aqara_click = "click"; // deprecated
|
||||
const char *aqara_action = "action"; // deprecated
|
||||
#endif
|
||||
Z_attribute & attr_click = attr_list.addAttribute(PSTR("Click"), true);
|
||||
|
||||
switch (val) {
|
||||
@ -1408,14 +1419,14 @@ void ZCLFrame::syntheticAqaraVibration(class Z_attribute_list &attr_list, class
|
||||
case 0x0055:
|
||||
{
|
||||
int32_t ivalue = attr.getInt();
|
||||
const __FlashStringHelper * svalue;
|
||||
const char * svalue;
|
||||
switch (ivalue) {
|
||||
case 1: svalue = F("vibrate"); break;
|
||||
case 2: svalue = F("tilt"); break;
|
||||
case 3: svalue = F("drop"); break;
|
||||
default: svalue = F("unknown"); break;
|
||||
case 1: svalue = PSTR("vibrate"); break;
|
||||
case 2: svalue = PSTR("tilt"); break;
|
||||
case 3: svalue = PSTR("drop"); break;
|
||||
default: svalue = PSTR("unknown"); break;
|
||||
}
|
||||
attr.setStr((const char*)svalue);
|
||||
attr.setStr(svalue);
|
||||
}
|
||||
break;
|
||||
case 0x0503:
|
||||
|
Loading…
x
Reference in New Issue
Block a user