mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix picnic typing (#82476)
This commit is contained in:
parent
a88e865dff
commit
848821139d
@ -1,6 +1,8 @@
|
|||||||
"""Services for the Picnic integration."""
|
"""Services for the Picnic integration."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import cast
|
||||||
|
|
||||||
from python_picnic_api import PicnicAPI
|
from python_picnic_api import PicnicAPI
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
@ -64,7 +66,7 @@ async def handle_add_product(
|
|||||||
product_id = call.data.get("product_id")
|
product_id = call.data.get("product_id")
|
||||||
if not product_id:
|
if not product_id:
|
||||||
product_id = await hass.async_add_executor_job(
|
product_id = await hass.async_add_executor_job(
|
||||||
_product_search, api_client, call.data.get("product_name")
|
_product_search, api_client, cast(str, call.data["product_name"])
|
||||||
)
|
)
|
||||||
|
|
||||||
if not product_id:
|
if not product_id:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user