diff --git a/custom_components/frigate/switch.py b/custom_components/frigate/switch.py index ccbc2c50..8a875d59 100644 --- a/custom_components/frigate/switch.py +++ b/custom_components/frigate/switch.py @@ -126,7 +126,7 @@ def is_on(self) -> bool: async def async_turn_on(self, **kwargs: Any) -> None: """Turn the device on.""" - async_publish( + await async_publish( self.hass, self._command_topic, "ON", @@ -136,7 +136,7 @@ async def async_turn_on(self, **kwargs: Any) -> None: async def async_turn_off(self, **kwargs: Any) -> None: """Turn the device off.""" - async_publish( + await async_publish( self.hass, self._command_topic, "OFF", diff --git a/hacs.json b/hacs.json index 93ad1a13..0702e412 100644 --- a/hacs.json +++ b/hacs.json @@ -9,5 +9,5 @@ "switch" ], "iot_class": "Local Push", - "homeassistant": "0.115.0" + "homeassistant": "2021.12.0b0" } \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index a30a719c..86539f16 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ aiohttp aiohttp_cors==0.7.0 attr -homeassistant==2021.9.0b2 +homeassistant==2021.12.0b2 paho-mqtt==1.5.1 python-dateutil yarl diff --git a/requirements_dev.txt b/requirements_dev.txt index f4c5f0f2..b614a551 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -3,8 +3,8 @@ black flake8 mypy==0.910 pre-commit -pytest==6.2.4 -pytest-homeassistant-custom-component==0.4.4 +pytest==6.2.5 +pytest-homeassistant-custom-component==0.5.0 pylint-pytest pylint==2.8.3 pytest-aiohttp==0.3.0 diff --git a/tests/conftest.py b/tests/conftest.py index a912a043..3b91ef76 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -51,6 +51,7 @@ async def allow_proxy(request: Any, hass: Any) -> None: @pytest.fixture(autouse=True) def frigate_fixture( + socket_enabled: Any, allow_proxy: Any, skip_notifications: Any, enable_custom_integrations: Any, # noqa: F811 diff --git a/tests/test_views.py b/tests/test_views.py index 79343981..5260e5e5 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -95,11 +95,7 @@ async def hass_client_local_frigate( """Point the integration at a local fake Frigate server.""" def _assert_expected_headers(request: web.Request, allow_ws: bool = False) -> None: - for header in ( - hdrs.CONTENT_LENGTH, - hdrs.CONTENT_ENCODING, - ): - assert header not in request.headers + assert hdrs.CONTENT_ENCODING not in request.headers if not allow_ws: for header in (