WTH are attribues used for some time-series data?

Attributes are useful for conveying non-numeric metadata about a sensor measurement. But sometimes they are used for numeric measurements too.

Most recently, I realized that weather.get_forecasts returns /all/ of its data as attributes. As a result, I have no historical information on any of the weather data my HA instance has recorded. If I had known about this a long time ago, I could’ve setup sensors to record these values. But that’s manual, tedious, and easy to miss until you realize it’s too late.

I don’t think this is specific to weather - I already have a handful of template sensors that are just “record this attribute value as a sensor value”. So - WTH are attributes used for numeric time-series data?

weather.get_forecasts is an action and it returns a dictionary of data. It doesn’t become an attribute in an entity unless you have an integration that creates that entity, or you created a template sensor that stuffed the data into attributes.

Likewise, for any other entity that uses attributes to store numerical data, that is a choice made by the integration and not by HA.

I agree this is most often poor practice, but I don’t think there is anything HA can do about it. Eliminating the ability to store numerical data as an attribute is about all HA could do, which is the nuclear option and is honestly a bad idea.