add option to publish state as json

This commit is contained in:
technyon
2022-08-13 12:30:12 +02:00
parent a7797fc39e
commit cfe9aa0d29
7 changed files with 80 additions and 15 deletions

View File

@@ -67,6 +67,7 @@ private:
NukiLock::KeyTurnerState _keyTurnerState;
uint32_t _lastAuthId = 0xffff;
char _lastAuthName[33] = {0};
NukiLock::BatteryReport _batteryReport;
NukiLock::BatteryReport _lastBatteryReport;
@@ -81,10 +82,12 @@ private:
bool _hasKeypad = false;
bool _keypadEnabled = false;
bool _configRead = false;
bool _publishJson = false;
uint _maxKeypadCodeCount = 0;
unsigned long _nextLockStateUpdateTs = 0;
unsigned long _nextBatteryReportTs = 0;
unsigned long _nextConfigUpdateTs = 0;
unsigned long _nextKeypadUpdateTs = 0;
NukiLock::LockAction _nextLockAction = (NukiLock::LockAction)0xff;
char _lastLockAction[15] = { 0 };
};