Skip to content

v0.12.4

Choose a tag to compare

@michaeldavie michaeldavie released this 25 Jan 20:26
· 17 commits to main since this release

New Features

  • Cache: Add Cache.clear() class method to clear cache entries by prefix or all entries
  • ECMap: Add clear_cache() method to clear cached basemap, layer, legend, and capabilities data for a map instance
  • ECRadar: Add clear_cache() method to clear cached radar data, useful when changing precip_type to ensure fresh images are fetched

Background

This release adds public API methods to support the Home Assistant integration fix in home-assistant/core#156152. The new clear_cache() methods allow clearing cached radar images when changing precipitation type, without requiring access to private members.

Usage

radar = ECRadar(coordinates=(50, -100), precip_type="rain")
await radar.update()

# When changing precip type, clear the cache first
radar.clear_cache()
radar.precip_type = "snow"
await radar.update()