Skip to content

Commit 0bd8a5e

Browse files
committed
Fix 2
1 parent 59d24b3 commit 0bd8a5e

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

homeassistant/components/rest/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import contextlib
77
from datetime import timedelta
88
import logging
9-
from typing import Any, cast
9+
from typing import Any
1010

1111
import httpx
1212
import voluptuous as vol
@@ -160,11 +160,7 @@ def _rest_coordinator(
160160
if resource_template:
161161

162162
async def _async_refresh_with_resource_template() -> None:
163-
rest.set_url(
164-
cast(template.Template, resource_template).async_render(
165-
parse_result=False
166-
)
167-
)
163+
rest.set_url(resource_template.async_render(parse_result=False))
168164
await rest.async_update()
169165

170166
update_method = _async_refresh_with_resource_template

homeassistant/helpers/singleton.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def wrapped(hass: HomeAssistant) -> _T:
3838
async def async_wrapped(hass: HomeAssistant) -> Any:
3939
if data_key not in hass.data:
4040
evt = hass.data[data_key] = asyncio.Event()
41-
result = await func(hass) # type: ignore[misc]
41+
result = await func(hass)
4242
hass.data[data_key] = result
4343
evt.set()
4444
return cast(_T, result)

0 commit comments

Comments
 (0)