diff --git a/.strict-typing b/.strict-typing index 9c70e27895d..f01c3541b0e 100644 --- a/.strict-typing +++ b/.strict-typing @@ -295,6 +295,7 @@ homeassistant.components.open_meteo.* homeassistant.components.openexchangerates.* homeassistant.components.opensky.* homeassistant.components.openuv.* +homeassistant.components.oralb.* homeassistant.components.otbr.* homeassistant.components.overkiz.* homeassistant.components.p1_monitor.* diff --git a/homeassistant/components/oralb/__init__.py b/homeassistant/components/oralb/__init__.py index c981ad01bd8..4a4d06cabbb 100644 --- a/homeassistant/components/oralb/__init__.py +++ b/homeassistant/components/oralb/__init__.py @@ -3,7 +3,7 @@ from __future__ import annotations import logging -from oralb_ble import OralBBluetoothDeviceData +from oralb_ble import OralBBluetoothDeviceData, SensorUpdate from homeassistant.components.bluetooth import ( BluetoothScanningMode, @@ -45,7 +45,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: ) ) - async def _async_poll(service_info: BluetoothServiceInfoBleak): + async def _async_poll(service_info: BluetoothServiceInfoBleak) -> SensorUpdate: # BluetoothServiceInfoBleak is defined in HA, otherwise would just pass it # directly to the oralb code # Make sure the device we have is one that we can connect with diff --git a/mypy.ini b/mypy.ini index 3f478afaa82..44cd6af98b0 100644 --- a/mypy.ini +++ b/mypy.ini @@ -2711,6 +2711,16 @@ disallow_untyped_defs = true warn_return_any = true warn_unreachable = true +[mypy-homeassistant.components.oralb.*] +check_untyped_defs = true +disallow_incomplete_defs = true +disallow_subclassing_any = true +disallow_untyped_calls = true +disallow_untyped_decorators = true +disallow_untyped_defs = true +warn_return_any = true +warn_unreachable = true + [mypy-homeassistant.components.otbr.*] check_untyped_defs = true disallow_incomplete_defs = true