From 4577f28b99c7b71504ed04adb12c5110d231ad76 Mon Sep 17 00:00:00 2001 From: Max Milavkin Date: Wed, 1 May 2024 16:01:01 +0300 Subject: [PATCH] MI monitor::update depricated method --- bt_exporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bt_exporter.py b/bt_exporter.py index eebb674..f2573b4 100644 --- a/bt_exporter.py +++ b/bt_exporter.py @@ -52,7 +52,7 @@ class AppMetrics: for mac, location in self.devices: log.info(f"Fetching '{mac}' ({location})") p = btle.Peripheral() - p.setDelegate(XiaoMiTemp(mac, location, self.temperature, self.humidity, self.battery)) + p.withDelegate(XiaoMiTemp(mac, location, self.temperature, self.humidity, self.battery)) # BLE performs very poorly, constant errors are not uncommon for attempt in range(10):