Update uiprotect to 3.1.1 (#120173)

This commit is contained in:
J. Nick Koston 2024-06-22 18:11:48 -05:00 committed by GitHub
parent 57e615aa36
commit ea0c93e3db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 123 additions and 87 deletions

View file

@ -29,6 +29,7 @@ from uiprotect.data import (
Viewer,
WSSubscriptionMessage,
)
from uiprotect.websocket import WebsocketState
from homeassistant.components.unifiprotect.const import DOMAIN
from homeassistant.core import HomeAssistant
@ -148,7 +149,14 @@ def mock_entry(
ufp.ws_subscription = ws_callback
return Mock()
def subscribe_websocket_state(
ws_state_subscription: Callable[[WebsocketState], None],
) -> Any:
ufp.ws_state_subscription = ws_state_subscription
return Mock()
ufp_client.subscribe_websocket = subscribe
ufp_client.subscribe_websocket_state = subscribe_websocket_state
yield ufp