diff --git a/homeassistant/components/foursquare/__init__.py b/homeassistant/components/foursquare/__init__.py index c0eac33a6a8..12a29fd632e 100644 --- a/homeassistant/components/foursquare/__init__.py +++ b/homeassistant/components/foursquare/__init__.py @@ -3,6 +3,7 @@ from http import HTTPStatus import logging +from aiohttp import web import requests import voluptuous as vol @@ -85,11 +86,11 @@ class FoursquarePushReceiver(HomeAssistantView): url = "/api/foursquare" name = "foursquare" - def __init__(self, push_secret): + def __init__(self, push_secret: str) -> None: """Initialize the OAuth callback view.""" self.push_secret = push_secret - async def post(self, request): + async def post(self, request: web.Request) -> web.Response | None: """Accept the POST from Foursquare.""" try: data = await request.json() @@ -107,3 +108,4 @@ class FoursquarePushReceiver(HomeAssistantView): return self.json_message("Incorrect secret", HTTPStatus.BAD_REQUEST) request.app[KEY_HASS].bus.async_fire(EVENT_PUSH, data) + return None