[LPM] - Update state (#1445)
When issuing a low power mode change update the state to the controller
This commit is contained in:
1 parent
26c0cca614
commit
1b0778dc0a
2 files changed
+3
-1
No files matched your search
+1
-1
@@ -28,7 +28,7 @@ The interval between the ESP32 wake up is defined at build time by the macro `Ti
|
|||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
When coming back from mode 2 to mode 0 you may publish the command with a retain flag so as to enable the gateway to retrieve it when reconnecting.
|
When coming back from mode 2 to mode 0 you may publish the command with a retain flag so as to enable the gateway to retrieve it when reconnecting.
|
||||||
A low power mode switch is automatically created by discovery with Home Assistant, you may experience a delay between the command and the state update due to the fact that the update is published every 2 minutes.
|
A low power mode switch is automatically created by discovery with Home Assistant, you may experience a delay between the command and the state update due to the fact that the update will be revceived and acknowledged when the device woke up.
|
||||||
In low power mode you should use ESPWifiManualSetup so as to rely on the credentials entered into User_config.h.
|
In low power mode you should use ESPWifiManualSetup so as to rely on the credentials entered into User_config.h.
|
||||||
So as to do that uncomment the line below in User_config.h
|
So as to do that uncomment the line below in User_config.h
|
||||||
``` c
|
``` c
|
||||||
|
|||||||
@@ -802,6 +802,8 @@ void changelowpowermode(int newLowPowerMode) {
|
|||||||
preferences.begin(Gateway_Short_Name, false);
|
preferences.begin(Gateway_Short_Name, false);
|
||||||
preferences.putUInt("lowpowermode", lowpowermode);
|
preferences.putUInt("lowpowermode", lowpowermode);
|
||||||
preferences.end();
|
preferences.end();
|
||||||
|
// Publish the states to update the controller switch status
|
||||||
|
stateMeasures();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupBT() {
|
void setupBT() {
|
||||||
|
|||||||
Reference in new issue
Block a user