Skip to content

Commit c2e7196

Browse files
chore(pre-commit.ci): auto fixes
1 parent 5fd6a77 commit c2e7196

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/xiaomi_ble/parser.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,9 @@ def _parse_xiaomi(
20002000
# check that data contains object
20012001
if frctrl_object_include == 0 and self.device_id not in [0x0248]:
20022002
# data does not contain Object
2003-
_LOGGER.debug("Advertisement doesn't contain payload, adv: %s.\n%s", data.hex(), sinfo)
2003+
_LOGGER.debug(
2004+
"Advertisement doesn't contain payload, adv: %s.\n%s", data.hex(), sinfo
2005+
)
20042006
return False
20052007

20062008
self.pending = False
@@ -2277,10 +2279,12 @@ def _decrypt_mibeacon_legacy(
22772279
return decrypted_payload
22782280

22792281
async def _poll_roidmi_f8(self, client: BleakClient) -> dict[str, Any]:
2280-
""" Poll information from vacuum cleaner """
2282+
"""Poll information from vacuum cleaner"""
22812283

22822284
# FFD2: battery pack voltage (2 decimal volts)
2283-
battery_char = client.services.get_characteristic(SERVICE_BT_BASE.format("ffd2"))
2285+
battery_char = client.services.get_characteristic(
2286+
SERVICE_BT_BASE.format("ffd2")
2287+
)
22842288
payload = await client.read_gatt_char(battery_char)
22852289

22862290
if len(payload) >= 7:
@@ -2343,7 +2347,9 @@ async def async_poll(self, ble_device: BLEDevice) -> SensorUpdate:
23432347
try:
23442348
# HHCC plant/garden sensors: dedicated battery characteristic
23452349
if self.device_id in [0x03BC, 0x0098]:
2346-
battery_char = client.services.get_characteristic(CHARACTERISTIC_BATTERY)
2350+
battery_char = client.services.get_characteristic(
2351+
CHARACTERISTIC_BATTERY
2352+
)
23472353
payload = await client.read_gatt_char(battery_char)
23482354

23492355
self.set_device_sw_version(payload[2:].decode("utf-8"))

0 commit comments

Comments
 (0)