Merge pull request #1 from Sanapach/main

MI monitor::update depricated method
This commit is contained in:
Alexandr Bogomyakov authored and GitHub committed 2024-05-01 17:08:02 +03:00
commit 6cfb4c1883
1 file changed
+1 -1
+1 -1
View File
@@ -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):