Compare commits

...

4 Commits

Author SHA1 Message Date
Erik
79e20a912f Update test 2026-02-03 20:20:57 +01:00
Erik
2251a8d338 Update test 2026-02-03 20:02:53 +01:00
Erik
7ea36df680 Adjust type annotations 2026-02-03 19:42:45 +01:00
Erik
74b53a3f61 Bump python-otbr-api to 2.8.0 2026-02-03 19:32:28 +01:00
7 changed files with 10 additions and 7 deletions

View File

@@ -8,5 +8,5 @@
"documentation": "https://www.home-assistant.io/integrations/otbr",
"integration_type": "service",
"iot_class": "local_polling",
"requirements": ["python-otbr-api==2.7.1"]
"requirements": ["python-otbr-api==2.8.0"]
}

View File

@@ -54,7 +54,7 @@ class DatasetEntry:
return cast(tlv_parser.Channel, channel).channel
@cached_property
def dataset(self) -> dict[MeshcopTLVType, tlv_parser.MeshcopTLVItem]:
def dataset(self) -> dict[MeshcopTLVType | int, tlv_parser.MeshcopTLVItem]:
"""Return the dataset in dict format."""
return tlv_parser.parse_tlv(self.tlv)

View File

@@ -7,7 +7,7 @@
"documentation": "https://www.home-assistant.io/integrations/thread",
"integration_type": "service",
"iot_class": "local_polling",
"requirements": ["python-otbr-api==2.7.1", "pyroute2==0.7.5"],
"requirements": ["python-otbr-api==2.8.0", "pyroute2==0.7.5"],
"single_config_entry": true,
"zeroconf": ["_meshcop._udp.local."]
}

2
requirements_all.txt generated
View File

@@ -2571,7 +2571,7 @@ python-opensky==1.0.1
# homeassistant.components.otbr
# homeassistant.components.thread
python-otbr-api==2.7.1
python-otbr-api==2.8.0
# homeassistant.components.overseerr
python-overseerr==0.8.0

View File

@@ -2164,7 +2164,7 @@ python-opensky==1.0.1
# homeassistant.components.otbr
# homeassistant.components.thread
python-otbr-api==2.7.1
python-otbr-api==2.8.0
# homeassistant.components.overseerr
python-overseerr==0.8.0

View File

@@ -64,7 +64,7 @@ DATASET_1_LARGER_TIMESTAMP = (
async def test_add_invalid_dataset(hass: HomeAssistant) -> None:
"""Test adding an invalid dataset."""
with pytest.raises(TLVError, match="unknown type 222"):
with pytest.raises(TLVError, match="expected 173 bytes for tag 222, got 2"):
await dataset_store.async_add_dataset(hass, "source", "DEADBEEF")
store = await dataset_store.async_get_store(hass)

View File

@@ -57,7 +57,10 @@ async def test_add_invalid_dataset(
)
msg = await client.receive_json()
assert not msg["success"]
assert msg["error"] == {"code": "invalid_format", "message": "unknown type 222"}
assert msg["error"] == {
"code": "invalid_format",
"message": "expected 173 bytes for tag 222, got 2",
}
async def test_delete_dataset(