Skip to content

Commit

Permalink
Fixes for HA 2021.12 (#183)
Browse files Browse the repository at this point in the history
* Fixes for HA 2021.12 .

* Minor code style fix.
  • Loading branch information
dermotduffy committed Dec 9, 2021
1 parent b9bdcf3 commit 4d2f587
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions custom_components/frigate/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"switch"
],
"iot_class": "Local Push",
"homeassistant": "0.115.0"
"homeassistant": "2021.12.0b0"
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 4d2f587

Please sign in to comment.