diff --git a/homeassistant/components/nest/config_flow.py b/homeassistant/components/nest/config_flow.py index bccac112d55c3a5f6fa76966463c64390e154a1e..aac8c263ef13f9a11be8376d5c6e2f74bb0f2e4b 100644 --- a/homeassistant/components/nest/config_flow.py +++ b/homeassistant/components/nest/config_flow.py @@ -489,7 +489,7 @@ class NestFlowHandler( config_path = info["nest_conf_path"] if not await self.hass.async_add_executor_job(os.path.isfile, config_path): - self.flow_impl = DOMAIN # type: ignore + self.flow_impl = DOMAIN # type: ignore[assignment] return await self.async_step_link() flow = self.hass.data[DATA_FLOW_IMPL][DOMAIN] diff --git a/homeassistant/components/norway_air/air_quality.py b/homeassistant/components/norway_air/air_quality.py index 146f4b2ff27ed47f6d597ed7f9229eedeb2da6a5..b6182d7ed843cc2e31efc49f5d6dc8883fca2fa3 100644 --- a/homeassistant/components/norway_air/air_quality.py +++ b/homeassistant/components/norway_air/air_quality.py @@ -106,31 +106,31 @@ class AirSensor(AirQualityEntity): """Return the name of the sensor.""" return self._name - @property # type: ignore + @property # type: ignore[misc] @round_state def air_quality_index(self): """Return the Air Quality Index (AQI).""" return self._api.data.get("aqi") - @property # type: ignore + @property # type: ignore[misc] @round_state def nitrogen_dioxide(self): """Return the NO2 (nitrogen dioxide) level.""" return self._api.data.get("no2_concentration") - @property # type: ignore + @property # type: ignore[misc] @round_state def ozone(self): """Return the O3 (ozone) level.""" return self._api.data.get("o3_concentration") - @property # type: ignore + @property # type: ignore[misc] @round_state def particulate_matter_2_5(self): """Return the particulate matter 2.5 level.""" return self._api.data.get("pm25_concentration") - @property # type: ignore + @property # type: ignore[misc] @round_state def particulate_matter_10(self): """Return the particulate matter 10 level.""" diff --git a/homeassistant/components/notify/legacy.py b/homeassistant/components/notify/legacy.py index 5f26c952b31d54348bdf9ccf12fb0830db282782..af29a9fba99f960fdbaebf5e284752206099af58 100644 --- a/homeassistant/components/notify/legacy.py +++ b/homeassistant/components/notify/legacy.py @@ -178,7 +178,7 @@ class BaseNotificationService: # While not purely typed, it makes typehinting more useful for us # and removes the need for constant None checks or asserts. - hass: HomeAssistant = None # type: ignore + hass: HomeAssistant = None # type: ignore[assignment] # Name => target registered_targets: dict[str, str] @@ -246,7 +246,7 @@ class BaseNotificationService: if hasattr(self, "targets"): stale_targets = set(self.registered_targets) - for name, target in self.targets.items(): # type: ignore + for name, target in self.targets.items(): # type: ignore[attr-defined] target_name = slugify(f"{self._target_service_name_prefix}_{name}") if target_name in stale_targets: stale_targets.remove(target_name) diff --git a/homeassistant/components/tibber/sensor.py b/homeassistant/components/tibber/sensor.py index ebb986d6a7ed1e03fffb2cee8cecbc28200c1718..12bcec295d06ee98afaf730cd2a05164759a725f 100644 --- a/homeassistant/components/tibber/sensor.py +++ b/homeassistant/components/tibber/sensor.py @@ -464,7 +464,7 @@ class TibberSensorRT(TibberSensor, update_coordinator.CoordinatorEntity): ts_local = dt_util.parse_datetime(live_measurement["timestamp"]) if ts_local is not None: if self.last_reset is None or ( - state < 0.5 * self.native_value # type: ignore # native_value is float + state < 0.5 * self.native_value # type: ignore[operator] # native_value is float and ( ts_local.hour == 0 or (ts_local - self.last_reset) > timedelta(hours=24) diff --git a/homeassistant/components/tplink/__init__.py b/homeassistant/components/tplink/__init__.py index 83f4b820523aeb7c77226c173edcbe898f69e203..33b03109cd8aecbddfe8d03d82c8edb74ba214a5 100644 --- a/homeassistant/components/tplink/__init__.py +++ b/homeassistant/components/tplink/__init__.py @@ -96,7 +96,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: device: SmartDevice = hass_data[entry.entry_id].device if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS): hass_data.pop(entry.entry_id) - await device.protocol.close() # type: ignore + await device.protocol.close() # type: ignore[no-untyped-call] return unload_ok diff --git a/homeassistant/components/zwave_js/climate.py b/homeassistant/components/zwave_js/climate.py index 6df95d9bbfce0d9d2e68fdbb70678e32acf14035..88c96feea88bfcb122722a96079b5507f3e69aa3 100644 --- a/homeassistant/components/zwave_js/climate.py +++ b/homeassistant/components/zwave_js/climate.py @@ -242,7 +242,7 @@ class ZWaveClimate(ZWaveBaseEntity, ClimateEntity): if self._current_mode is None: # Thermostat(valve) with no support for setting a mode is considered heating-only return [ThermostatSetpointType.HEATING] - return THERMOSTAT_MODE_SETPOINT_MAP.get(int(self._current_mode.value), []) # type: ignore + return THERMOSTAT_MODE_SETPOINT_MAP.get(int(self._current_mode.value), []) # type: ignore[no-any-return] @property def temperature_unit(self) -> str: