publish first config values via mqtt
This commit is contained in:
@@ -26,6 +26,9 @@ private:
|
||||
|
||||
void updateKeyTurnerState();
|
||||
void updateBatteryState();
|
||||
void updateConfig();
|
||||
|
||||
void readConfig();
|
||||
|
||||
Nuki::LockAction lockActionToEnum(const char* str); // char array at least 14 characters
|
||||
|
||||
@@ -36,6 +39,7 @@ private:
|
||||
Preferences* _preferences;
|
||||
int _intervalLockstate = 0; // seconds
|
||||
int _intervalBattery = 0; // seconds
|
||||
int _intervalConfig = 60 * 60; // seconds
|
||||
|
||||
Nuki::KeyTurnerState _lastKeyTurnerState;
|
||||
Nuki::KeyTurnerState _keyTurnerState;
|
||||
@@ -43,10 +47,14 @@ private:
|
||||
Nuki::BatteryReport _batteryReport;
|
||||
Nuki::BatteryReport _lastBatteryReport;
|
||||
|
||||
Nuki::Config _nukiConfig = {0};
|
||||
bool _nukiConfigValid = false;
|
||||
|
||||
bool _paired = false;
|
||||
bool _statusUpdated = false;
|
||||
unsigned long _nextLockStateUpdateTs = 0;
|
||||
unsigned long _nextBatteryReportTs = 0;
|
||||
unsigned long _nextConfigUpdateTs = 0;
|
||||
unsigned long _nextPairTs = 0;
|
||||
Nuki::LockAction _nextLockAction = (Nuki::LockAction)0xff;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user