Update uiprotect to 3.1.1 (#120173)
This commit is contained in:
parent
57e615aa36
commit
ea0c93e3db
11 changed files with 123 additions and 87 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue