From bdcccd9d830d45d965d3da1a907fdd89d991eac8 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 6 Jan 2023 03:39:37 +0100 Subject: [PATCH] Improve weather Forecast typing (#85019) --- homeassistant/components/weather/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/weather/__init__.py b/homeassistant/components/weather/__init__.py index 805139d134e..fcfba179cd7 100644 --- a/homeassistant/components/weather/__init__.py +++ b/homeassistant/components/weather/__init__.py @@ -9,6 +9,8 @@ import inspect import logging from typing import Any, Final, TypedDict, final +from typing_extensions import Required + from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( PRECISION_HALVES, @@ -159,7 +161,7 @@ class Forecast(TypedDict, total=False): """ condition: str | None - datetime: str + datetime: Required[str] precipitation_probability: int | None native_precipitation: float | None precipitation: None