Skip to content

Commit adedf20

Browse files
authored
Fix improv_ble provisioning futures type (home-assistant#154530)
1 parent 188459e commit adedf20

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

homeassistant/components/improv_ble/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import asyncio
56
import logging
67

78
from homeassistant.core import HomeAssistant, callback
@@ -15,7 +16,9 @@
1516

1617

1718
@callback
18-
def async_get_provisioning_futures(hass: HomeAssistant) -> dict:
19+
def async_get_provisioning_futures(
20+
hass: HomeAssistant,
21+
) -> dict[str, asyncio.Future[str]]:
1922
"""Get the provisioning futures registry, creating it if needed.
2023
2124
This is a helper function for internal use and testing.

homeassistant/components/improv_ble/config_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ async def async_step_identify(
296296
@asynccontextmanager
297297
async def _async_provision_context(
298298
self, ble_mac: str
299-
) -> AsyncIterator[asyncio.Future[str | None]]:
299+
) -> AsyncIterator[asyncio.Future[str]]:
300300
"""Context manager to register and cleanup provisioning future."""
301301
future = self.hass.loop.create_future()
302302
provisioning_futures = async_get_provisioning_futures(self.hass)

homeassistant/components/improv_ble/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
DOMAIN = "improv_ble"
1010

11-
PROVISIONING_FUTURES: HassKey[dict[str, asyncio.Future[str | None]]] = HassKey(DOMAIN)
11+
PROVISIONING_FUTURES: HassKey[dict[str, asyncio.Future[str]]] = HassKey(DOMAIN)
1212

1313
# Timeout in seconds to wait for another integration to register a next flow
1414
# after successful provisioning (e.g., ESPHome discovering the device)

0 commit comments

Comments
 (0)