Add websocket type hints in components (#80654)

* Add websocket type hints in components

* Adjust

* Apply suggestion

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
This commit is contained in:
epenet 2022-10-20 13:41:14 +02:00 committed by GitHub
parent ae7eb9cef9
commit 2c43606922
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 116 additions and 40 deletions

View file

@ -57,7 +57,11 @@ def _ensure_webhook_access(func):
vol.Required("confirm_id"): str,
}
)
def handle_push_notification_confirm(hass, connection, msg):
def handle_push_notification_confirm(
hass: HomeAssistant,
connection: websocket_api.ActiveConnection,
msg: dict[str, Any],
) -> None:
"""Confirm receipt of a push notification."""
channel: PushChannel | None = hass.data[DOMAIN][DATA_PUSH_CHANNEL].get(
msg["webhook_id"]