Skip to content

Commit 2a35e9e

Browse files
committed
Update token expiry on a regular basis
1 parent 07a843e commit 2a35e9e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/bluetooth/mlm2pro_device.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ def _heartbeat(self) -> None:
252252
logging.debug(f'Heartbeat not received for {MLM2PRODevice.MLM2PRO_HEARTBEAT_INTERVAL} seconds, resubscribing...')
253253
self._set_next_expected_heartbeat()
254254
self._primary_service.write_characteristic(MLM2PRODevice.HEARTBEAT_CHARACTERISTIC_UUID, bytearray([0x01]))
255+
self.__token_expiry_date_state(self._settings.web_api['token_expiry'])
255256

256257
def __send_initial_params(self, data: bytearray) -> None:
257258
byte_array = data[2:]

0 commit comments

Comments
 (0)