diff --git a/pylint/plugins/hass_enforce_type_hints.py b/pylint/plugins/hass_enforce_type_hints.py index b34b88c27c9aa4..3d86767df439e0 100644 --- a/pylint/plugins/hass_enforce_type_hints.py +++ b/pylint/plugins/hass_enforce_type_hints.py @@ -1968,6 +1968,77 @@ class ClassTypeHintMatch: ], ), ], + "weather": [ + ClassTypeHintMatch( + base_class="Entity", + matches=_ENTITY_MATCH, + ), + ClassTypeHintMatch( + base_class="WeatherEntity", + matches=[ + TypeHintMatch( + function_name="native_temperature", + return_type=["float", None], + ), + TypeHintMatch( + function_name="native_temperature_unit", + return_type=["str", None], + ), + TypeHintMatch( + function_name="native_pressure", + return_type=["float", None], + ), + TypeHintMatch( + function_name="native_pressure_unit", + return_type=["str", None], + ), + TypeHintMatch( + function_name="humidity", + return_type=["float", None], + ), + TypeHintMatch( + function_name="native_wind_speed", + return_type=["float", None], + ), + TypeHintMatch( + function_name="native_wind_speed_unit", + return_type=["str", None], + ), + TypeHintMatch( + function_name="wind_bearing", + return_type=["float", "str", None], + ), + TypeHintMatch( + function_name="ozone", + return_type=["float", None], + ), + TypeHintMatch( + function_name="native_visibility", + return_type=["float", None], + ), + TypeHintMatch( + function_name="native_visibility_unit", + return_type=["str", None], + ), + TypeHintMatch( + function_name="forecast", + return_type=["list[Forecast]", None], + ), + TypeHintMatch( + function_name="native_precipitation_unit", + return_type=["str", None], + ), + TypeHintMatch( + function_name="precision", + return_type="float", + ), + TypeHintMatch( + function_name="condition", + return_type=["str", None], + ), + ], + ), + ], }