From 1ed91991c40ac0be4ab7c2f8b29e6ec1a5efe1fb Mon Sep 17 00:00:00 2001 From: Ashley Gittins Date: Fri, 25 Aug 2023 20:48:23 +0000 Subject: [PATCH] (fix): Fix timestamps not being updated --- custom_components/bermuda/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/bermuda/__init__.py b/custom_components/bermuda/__init__.py index ca0abab..2177461 100644 --- a/custom_components/bermuda/__init__.py +++ b/custom_components/bermuda/__init__.py @@ -130,10 +130,10 @@ def __init__( self.stamp: float = None # Only remote scanners log timestamps here (local usb adaptors do not), # so check if the dict is there at all first... - if "_discovered_device_timestamps" in vars(scandata.scanner): + if hasattr(scandata.scanner, "_discovered_device_timestamps"): # Found a remote scanner which has timestamp history... - # FIXME: + # FIXME: Doesn't appear to be any API to get this otherwise... # pylint: disable-next=protected-access stamps = scandata.scanner._discovered_device_timestamps