diff --git a/homeassistant/components/nws/weather.py b/homeassistant/components/nws/weather.py index 3c7393aa1842bf..57487bf920460d 100644 --- a/homeassistant/components/nws/weather.py +++ b/homeassistant/components/nws/weather.py @@ -178,6 +178,7 @@ async def async_added_to_hass(self) -> None: if (coordinator := self.forecast_coordinators[forecast_type]) is None: continue if TYPE_CHECKING: + # TODO Literal inference forecast_type = cast(Literal["twice_daily", "hourly"], forecast_type) self.unsub_forecast[forecast_type] = coordinator.async_add_listener( partial(self._handle_forecast_update, forecast_type)