diff --git a/tasmota/xdrv_52_3_berry_tasmota_global.ino b/tasmota/xdrv_52_3_berry_tasmota_global.ino index affb2f19d..e5f3bad46 100644 --- a/tasmota/xdrv_52_3_berry_tasmota_global.ino +++ b/tasmota/xdrv_52_3_berry_tasmota_global.ino @@ -33,9 +33,10 @@ extern "C" { extern const be_ctypes_structure_t be_tasmota_global_struct = { sizeof(TasmotaGlobal), /* size in bytes */ - 1, /* number of elements */ + 2, /* number of elements */ nullptr, (const be_ctypes_structure_item_t[2]) { + { "devices_present", offsetof(TasmotaGlobal_t, devices_present), 0, 0, ctypes_u8, 0 }, { "sleep", offsetof(TasmotaGlobal_t, sleep), 0, 0, ctypes_u8, 0 }, }}; @@ -43,7 +44,7 @@ extern "C" { sizeof(TSettings), /* size in bytes */ 1, /* number of elements */ nullptr, - (const be_ctypes_structure_item_t[2]) { + (const be_ctypes_structure_item_t[1]) { { "sleep", offsetof(TSettings, sleep), 0, 0, ctypes_u8, 0 }, }}; diff --git a/tasmota/xdrv_52_9_berry.ino b/tasmota/xdrv_52_9_berry.ino index b59fa2f80..bee52522e 100644 --- a/tasmota/xdrv_52_9_berry.ino +++ b/tasmota/xdrv_52_9_berry.ino @@ -811,8 +811,9 @@ bool Xdrv52(uint8_t function) case FUNC_EVERY_SECOND: callBerryEventDispatcher(PSTR("every_second"), nullptr, 0, nullptr); break; - // case FUNC_SET_POWER: - // break; + case FUNC_SET_POWER: + callBerryEventDispatcher(PSTR("set_power_handler"), nullptr, XdrvMailbox.index, nullptr); + break; #ifdef USE_WEBSERVER case FUNC_WEB_ADD_CONSOLE_BUTTON: if (XdrvMailbox.index) {