~/Projects/Tasmota
git clone https://code.lsong.org/Tasmota
Commit
- Commit
- 728b1b2d369ab2dd943dfa62140942774b0274aa
- Author
- Paul Blacknell <[email protected]>
- Date
- 2023-09-10 21:35:54 +0100 +0100
- Diffstat
tasmota/tasmota_xdrv_driver/xdrv_29_deepsleep.ino | 11 ++++-------
Update xdrv_29_deepsleep.ino (#19492)
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_29_deepsleep.ino b/tasmota/tasmota_xdrv_driver/xdrv_29_deepsleep.ino index 6d639bce8b0a6d0edb91fd8f852917b3aad62cf7..1867b2c412de3a3ce0d6c9efa3776b46f41451f9 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_29_deepsleep.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_29_deepsleep.ino @@ -131,6 +131,10 @@ } String dt = GetDT(RtcSettings.nextwakeup); // 2017-03-07T11:08:02 /* + esp_deep_sleep_start(); + dt += GetTimeZone(); // 2017-03-07T11:08:02-07:00 + } +/* This program is free software: you can redistribute it and/or modify // uint32_t deepsleep_sleeptime = DEEPSLEEP_MAX_CYCLE < (RtcSettings.nextwakeup - LocalTime()) ? (uint32_t)DEEPSLEEP_MAX_CYCLE : RtcSettings.nextwakeup - LocalTime(); deepsleep_sleeptime = tmin((uint32_t)DEEPSLEEP_MAX_CYCLE ,RtcSettings.nextwakeup - LocalTime()); @@ -139,13 +143,6 @@ // Sending Deepsleep parameters to automation for react Response_P(PSTR("{\"" D_PRFX_DEEPSLEEP "\":{\"" D_JSON_TIME "\":\"%s\",\"" D_PRFX_DEEPSLEEP "\":%d,\"Wakeup\":%d}}"), (char*)dt.c_str(), LocalTime(), RtcSettings.nextwakeup); MqttPublishPrefixTopicRulesProcess_P(TELE, PSTR(D_PRFX_DEEPSLEEP), true); - // Change LWT Topic to Sleep to ensure automation see different state - //GetTopic_P(stopic, TELE, TasmotaGlobal.mqtt_topic, S_LWT); - //Response_P(PSTR(D_PRFX_DEEPSLEEP)); - //MqttPublish(stopic, true); - - //MqttClient.disconnect(true); - //EspClient.stop(); WifiShutdown(); RtcSettings.ultradeepsleep = RtcSettings.nextwakeup - LocalTime(); RtcSettingsSave();