diff --git a/CHANGELOG.md b/CHANGELOG.md index 42901e390..42f7b94ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ All notable changes to this project will be documented in this file. - HDMI CEC synchronously sends messages - Zigbee startup event triggered after plugins are loaded - Reduced safeboot size by 2.9KB +- Changed internal macro `APP_SLEEP` to `TASMOTA_SLEEP` to specify default sleep in ms ### Fixed - HASPmota `align` attribute and expand PNG cache diff --git a/tasmota/include/tasmota_configurations.h b/tasmota/include/tasmota_configurations.h index 2fa4f554b..80401756f 100644 --- a/tasmota/include/tasmota_configurations.h +++ b/tasmota/include/tasmota_configurations.h @@ -694,9 +694,6 @@ #define CODE_IMAGE_STR "lite" #endif -#undef APP_SLEEP -#define APP_SLEEP 1 // Default to sleep = 1 for FIRMWARE_LITE - #undef USE_ARDUINO_OTA // Disable support for Arduino OTA #undef USE_DOMOTICZ // Disable Domoticz #undef USE_HOME_ASSISTANT // Disable Home Assistant diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 44b7cc717..ddab367f1 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -286,7 +286,7 @@ https://rya.nc/tasmota-fingerprint.html" #define APP_BISTABLE_PULSE 40 // [SetOption45] Pulse time in ms for two coil bistable latching relays #define APP_NORMAL_SLEEP false // [SetOption60] Enable normal sleep instead of dynamic sleep -#define APP_SLEEP 0 // [Sleep] Sleep time to lower energy consumption (0 = Off, 1 - 250 mSec), +#define TASMOTA_SLEEP 50 // [Sleep] Sleep time to lower energy consumption (0 = Off, value in milliseconds), #define PWM_MAX_SLEEP 10 // Sleep will be lowered to this value when light is on, to avoid flickering, and when buzzer is on for better on/off period accuracy #define KEY_DEBOUNCE_TIME 50 // [ButtonDebounce] Number of mSeconds button press debounce time diff --git a/tasmota/tasmota_support/settings.ino b/tasmota/tasmota_support/settings.ino index 323a6b65f..165a45e10 100644 --- a/tasmota/tasmota_support/settings.ino +++ b/tasmota/tasmota_support/settings.ino @@ -995,10 +995,7 @@ void SettingsDefaultSet2(void) { Settings->param[P_BOOT_LOOP_OFFSET] = BOOT_LOOP_OFFSET; // SetOption36 Settings->param[P_RGB_REMAP] = RGB_REMAP_RGBW; #endif // FIRMWARE_MINIMAL - Settings->sleep = APP_SLEEP; - if (Settings->sleep < 50) { - Settings->sleep = 50; // Default to 50 for sleep, for now - } + Settings->sleep = TASMOTA_SLEEP; Settings->battery_level_percent = 101; // Module