Bump HAP-python to 4.7.0 (#94812)
parent
4def901ecc
commit
b857dc8d94
|
@ -626,10 +626,10 @@ class HomeDriver(AccessoryDriver): # type: ignore[misc]
|
|||
|
||||
@pyhap_callback # type: ignore[misc]
|
||||
def pair(
|
||||
self, client_uuid: UUID, client_public: str, client_permissions: int
|
||||
self, client_username_bytes: bytes, client_public: str, client_permissions: int
|
||||
) -> bool:
|
||||
"""Override super function to dismiss setup message if paired."""
|
||||
success = super().pair(client_uuid, client_public, client_permissions)
|
||||
success = super().pair(client_username_bytes, client_public, client_permissions)
|
||||
if success:
|
||||
async_dismiss_setup_message(self.hass, self._entry_id)
|
||||
return cast(bool, success)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"iot_class": "local_push",
|
||||
"loggers": ["pyhap"],
|
||||
"requirements": [
|
||||
"HAP-python==4.6.0",
|
||||
"HAP-python==4.7.0",
|
||||
"fnv-hash-fast==0.3.1",
|
||||
"PyQRCode==1.2.1",
|
||||
"base36==0.1.1"
|
||||
|
|
|
@ -26,7 +26,7 @@ CO2Signal==0.4.2
|
|||
DoorBirdPy==2.1.0
|
||||
|
||||
# homeassistant.components.homekit
|
||||
HAP-python==4.6.0
|
||||
HAP-python==4.7.0
|
||||
|
||||
# homeassistant.components.tasmota
|
||||
HATasmota==0.6.5
|
||||
|
|
|
@ -25,7 +25,7 @@ CO2Signal==0.4.2
|
|||
DoorBirdPy==2.1.0
|
||||
|
||||
# homeassistant.components.homekit
|
||||
HAP-python==4.6.0
|
||||
HAP-python==4.7.0
|
||||
|
||||
# homeassistant.components.tasmota
|
||||
HATasmota==0.6.5
|
||||
|
|
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||
|
||||
import asyncio
|
||||
from unittest.mock import ANY, AsyncMock, MagicMock, Mock, patch
|
||||
from uuid import uuid1
|
||||
|
||||
from pyhap.accessory import Accessory
|
||||
from pyhap.const import CATEGORY_CAMERA, CATEGORY_TELEVISION
|
||||
|
@ -868,11 +869,11 @@ async def test_homekit_unpair(
|
|||
homekit.driver.aio_stop_event = MagicMock()
|
||||
|
||||
state = homekit.driver.state
|
||||
state.add_paired_client("client1", "any", b"1")
|
||||
state.add_paired_client("client2", "any", b"0")
|
||||
state.add_paired_client("client3", "any", b"1")
|
||||
state.add_paired_client("client4", "any", b"0")
|
||||
state.add_paired_client("client5", "any", b"0")
|
||||
state.add_paired_client(str(uuid1()).encode("utf-8"), "any", b"1")
|
||||
state.add_paired_client(str(uuid1()).encode("utf-8"), "any", b"0")
|
||||
state.add_paired_client(str(uuid1()).encode("utf-8"), "any", b"1")
|
||||
state.add_paired_client(str(uuid1()).encode("utf-8"), "any", b"0")
|
||||
state.add_paired_client(str(uuid1()).encode("utf-8"), "any", b"0")
|
||||
|
||||
formatted_mac = dr.format_mac(state.mac)
|
||||
hk_bridge_dev = device_registry.async_get_device(
|
||||
|
@ -917,7 +918,8 @@ async def test_homekit_unpair_missing_device_id(
|
|||
homekit.driver.aio_stop_event = MagicMock()
|
||||
|
||||
state = homekit.driver.state
|
||||
state.add_paired_client("client1", "any", b"1")
|
||||
client_1 = str(uuid1()).encode("utf-8")
|
||||
state.add_paired_client(client_1, "any", b"1")
|
||||
with pytest.raises(HomeAssistantError):
|
||||
await hass.services.async_call(
|
||||
DOMAIN,
|
||||
|
@ -926,7 +928,7 @@ async def test_homekit_unpair_missing_device_id(
|
|||
blocking=True,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
state.paired_clients = {"client1": "any"}
|
||||
state.paired_clients = {client_1.decode("utf-8"): "any"}
|
||||
homekit.status = STATUS_STOPPED
|
||||
|
||||
|
||||
|
@ -967,7 +969,8 @@ async def test_homekit_unpair_not_homekit_device(
|
|||
)
|
||||
|
||||
state = homekit.driver.state
|
||||
state.add_paired_client("client1", "any", b"1")
|
||||
client_1 = str(uuid1()).encode("utf-8")
|
||||
state.add_paired_client(client_1, "any", b"1")
|
||||
with pytest.raises(HomeAssistantError):
|
||||
await hass.services.async_call(
|
||||
DOMAIN,
|
||||
|
@ -976,7 +979,7 @@ async def test_homekit_unpair_not_homekit_device(
|
|||
blocking=True,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
state.paired_clients = {"client1": "any"}
|
||||
state.paired_clients = {client_1.decode("utf-8"): "any"}
|
||||
homekit.status = STATUS_STOPPED
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue