Skip to content

Commit c69055f

Browse files
chore(pre-commit.ci): pre-commit autoupdate (#202)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a8e2428 commit c69055f

6 files changed

+47
-47
lines changed

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ repos:
3838
- id: pyupgrade
3939
args: [--py311-plus]
4040
- repo: https://github.com/PyCQA/isort
41-
rev: 5.13.2
41+
rev: 6.0.0
4242
hooks:
4343
- id: isort
4444
- repo: https://github.com/psf/black-pre-commit-mirror
45-
rev: 24.10.0
45+
rev: 25.1.0
4646
hooks:
4747
- id: black
4848
- repo: https://github.com/codespell-project/codespell
49-
rev: v2.4.0
49+
rev: v2.4.1
5050
hooks:
5151
- id: codespell
5252
- repo: https://github.com/PyCQA/flake8

src/bthome_ble/bthome_v1_encryption.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def main() -> None:
9191
print("Preparing data for encryption")
9292
count_id = bytes(bytearray.fromhex("00112233")) # count id (change every message)
9393
mac = binascii.unhexlify("5448E68F80A5") # MAC
94-
uuid16 = b"\x1E\x18"
94+
uuid16 = b"\x1e\x18"
9595
bindkey = binascii.unhexlify("231d39c1d7cc1ab1aee224cd096db932")
9696

9797
payload = encrypt_payload(

src/bthome_ble/bthome_v2_encryption.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def main() -> None:
9797
print("Preparing data for encryption")
9898
count_id = bytes(bytearray.fromhex("00112233")) # count id (change every message)
9999
mac = binascii.unhexlify("5448E68F80A5") # MAC
100-
uuid16 = b"\xD2\xFC"
100+
uuid16 = b"\xd2\xfc"
101101
sw_version = b"\x41"
102102
bindkey = binascii.unhexlify("231d39c1d7cc1ab1aee224cd096db932")
103103

tests/test_parser_v1.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ def test_bthome_illuminance(caplog):
443443

444444
def test_bthome_mass_kilograms(caplog):
445445
"""Test BTHome parser for mass reading in kilograms without encryption."""
446-
data_string = b"\x43\x06\xFE\x70"
446+
data_string = b"\x43\x06\xfe\x70"
447447
advertisement = bytes_to_service_info(
448448
data_string, local_name="TEST DEVICE", address="A4:C1:38:8D:18:B2"
449449
)
@@ -485,7 +485,7 @@ def test_bthome_mass_kilograms(caplog):
485485

486486
def test_bthome_mass_pounds(caplog):
487487
"""Test BTHome parser for mass reading in pounds without encryption."""
488-
data_string = b"\x03\x07\x3E\x1d"
488+
data_string = b"\x03\x07\x3e\x1d"
489489
advertisement = bytes_to_service_info(
490490
data_string, local_name="TEST DEVICE", address="A4:C1:38:8D:18:B2"
491491
)
@@ -525,7 +525,7 @@ def test_bthome_mass_pounds(caplog):
525525

526526
def test_bthome_dew_point(caplog):
527527
"""Test BTHome parser for dew point reading without encryption."""
528-
data_string = b"\x23\x08\xCA\x06"
528+
data_string = b"\x23\x08\xca\x06"
529529
advertisement = bytes_to_service_info(
530530
data_string, local_name="TEST DEVICE", address="A4:C1:38:8D:18:B2"
531531
)
@@ -733,7 +733,7 @@ def test_bthome_voltage(caplog):
733733

734734
def test_bthome_binary_sensor(caplog):
735735
"""Test BTHome parser for binary sensor without device class, without encryption."""
736-
data_string = b"\x02\x0F\x01"
736+
data_string = b"\x02\x0f\x01"
737737
advertisement = bytes_to_service_info(
738738
data_string, local_name="TEST DEVICE", address="A4:C1:38:8D:18:B2"
739739
)
@@ -963,7 +963,7 @@ def test_bthome_co2(caplog):
963963

964964
def test_bthome_timestamp(caplog):
965965
"""Test BTHome parser for Unix timestamp (seconds from 1-1-1970)."""
966-
data_string = b"\xA5\x50\x5D\x39\x61\x64"
966+
data_string = b"\xa5\x50\x5d\x39\x61\x64"
967967
advertisement = bytes_to_service_info(
968968
data_string, local_name="TEST DEVICE", address="A4:C1:38:8D:18:B2"
969969
)
@@ -1092,7 +1092,7 @@ def test_bthome_moisture(caplog):
10921092

10931093
def test_bthome_event_button_long_press(caplog):
10941094
"""Test BTHome parser for an event of a long press on a button without encryption."""
1095-
data_string = b"\x02\x3A\x04"
1095+
data_string = b"\x02\x3a\x04"
10961096
advertisement = bytes_to_service_info(
10971097
data_string, local_name="TEST DEVICE", address="A4:C1:38:8D:18:B2"
10981098
)
@@ -1135,7 +1135,7 @@ def test_bthome_event_button_long_press(caplog):
11351135

11361136
def test_bthome_event_dimmer_rotate_left_3_steps(caplog):
11371137
"""Test BTHome parser for an event rotating a dimmer 3 steps left."""
1138-
data_string = b"\x03\x3C\x01\x03"
1138+
data_string = b"\x03\x3c\x01\x03"
11391139
advertisement = bytes_to_service_info(
11401140
data_string, local_name="TEST DEVICE", address="A4:C1:38:8D:18:B2"
11411141
)

0 commit comments

Comments
 (0)