File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 6
6
import contextlib
7
7
from datetime import timedelta
8
8
import logging
9
- from typing import Any , cast
9
+ from typing import Any
10
10
11
11
import httpx
12
12
import voluptuous as vol
@@ -160,11 +160,7 @@ def _rest_coordinator(
160
160
if resource_template :
161
161
162
162
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 ))
168
164
await rest .async_update ()
169
165
170
166
update_method = _async_refresh_with_resource_template
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def wrapped(hass: HomeAssistant) -> _T:
38
38
async def async_wrapped (hass : HomeAssistant ) -> Any :
39
39
if data_key not in hass .data :
40
40
evt = hass .data [data_key ] = asyncio .Event ()
41
- result = await func (hass ) # type: ignore[misc]
41
+ result = await func (hass )
42
42
hass .data [data_key ] = result
43
43
evt .set ()
44
44
return cast (_T , result )
You can’t perform that action at this time.
0 commit comments