diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 61e481c907b8..be1435d25e1e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -72,6 +72,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota - Fix ledlink blink when no network connected regression from 8.3.1.4 (#9292) - Fix exception 28 due to device group buffer overflow (#9459) - Fix shutter timing problem due to buffer overflow in calibration matrix (#9458) +- Fix light wakeup exception 0 (divide by zero) when ``WakeupDuration`` is not initialised (#9466) - Add optional support for Mitsubishi Electric HVAC by David Gwynne (#9237) - Add optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353) - Add SDM630 three phase ImportActive Energy display when ``#define SDM630_IMPORT`` is enabled by Janusz Kostorz (#9124) diff --git a/tasmota/CHANGELOG.md b/tasmota/CHANGELOG.md index be54c8e09b0c..8899ce12fc00 100644 --- a/tasmota/CHANGELOG.md +++ b/tasmota/CHANGELOG.md @@ -13,6 +13,7 @@ - Fix ledlink blink when no network connected regression from 8.3.1.4 (#9292) - Fix exception 28 due to device group buffer overflow (#9459) - Fix shutter timing problem due to buffer overflow in calibration matrix (#9458) +- Fix light wakeup exception 0 (divide by zero) when ``WakeupDuration`` is not initialised (#9466) - Add optional support for Mitsubishi Electric HVAC by David Gwynne (#9237) - Add optional support for Orno WE517-Modbus energy meter by Maxime Vincent (#9353) - Add SDM630 three phase ImportActive Energy display when ``#define SDM630_IMPORT`` is enabled by Janusz Kostorz (#9124) diff --git a/tasmota/xdrv_04_light.ino b/tasmota/xdrv_04_light.ino index e0e3a7e66a7c..ffe346f5d017 100644 --- a/tasmota/xdrv_04_light.ino +++ b/tasmota/xdrv_04_light.ino @@ -278,7 +278,7 @@ struct LIGHT { uint8_t fixed_color_index = 1; uint8_t pwm_offset = 0; // Offset in color buffer uint8_t max_scheme = LS_MAX -1; - + uint32_t wakeup_start_time = 0; bool update = true; @@ -1395,6 +1395,9 @@ void LightInit(void) Light.power = 0; Light.update = true; Light.wakeup_active = 0; + if (0 == Settings.light_wakeup) { + Settings.light_wakeup = 60; // Fix divide by zero exception 0 in Animate + } if (Settings.flag4.fade_at_startup) { Light.fade_initialized = true; // consider fade intialized starting from black }