Skip to content

v2.0.5

Choose a tag to compare

@andrejs2 andrejs2 released this 24 Mar 10:39

Cloud Coverage + Restore Missing v1.3.1 Sensors + Forecast Enhancements

Cloud coverage (new)

  • cloud_coverage sensor -- cloud coverage percentage (0-100%) derived from ARSO's 8-level cloud scale (docs): jasno (0%) → pretežno jasno (12.5%) → rahlo oblačno (25%) → delno oblačno (50%) → zmerno oblačno (62.5%) → pretežno oblačno (87.5%) → oblačno (100%)
  • cloud_cover_text sensor -- raw Slovenian cloud text ("jasno", "delno oblačno", etc.)
  • native_cloud_coverage property on the weather entity
  • Added missing mostClear, slightCloudy, modCloudy icon mappings to CLOUD_CONDITION_MAP -- previously these observationAms-only icons resolved to "unknown" condition

New ArsoForecastSensor class

New sensor class that reads from forecast1h/forecast3h instead of observation data. Enables forecast-only fields for all 247 stations, including secondary stations that lack observationAms data.

Sensor Key Unit Description
Višina oblakov cloud_base_text -- Cloud base height ("nizka", "srednja", "visoka")
Napovedan sneg accumulated_snow_mm mm Forecast snowfall (water equivalent)
Napoveden dež accumulated_precipitation_mm mm Forecast precipitation

The forecast precipitation sensor restores functionality for ~140 secondary stations that lost their precipitation sensor in the v2.0 rewrite.

Weather entity forecast enhancements

All three forecast types (hourly, daily, twice-daily) now include:

  • native_wind_gust_speed -- wind gust speed (km/h)
  • cloud_coverage -- cloud coverage percentage (0-100%)
  • snow_precipitation -- snowfall in mm (hourly + twice-daily; not available for daily as ARSO does not provide sn_24h_acc)

Data integrity

  • Observation sensors always show real observation data -- the forecast3h fallback in _build_observation_proxy() exists as safety net only and does not trigger under normal conditions (verified: all 247 locations always return the observation key)
  • Forecast sensors are explicitly labeled ("Napovedan sneg", "Napoveden dež") with a forecast_time attribute instead of last_updated
  • Cloud condition fields are protected from observationAms overwrite during merge

Changes

  • models.py: cloud_coverage computed field (8-level ARSO scale)
  • weather_map.py: 3 text + 6 icon condition mappings for intermediate cloud levels
  • weather.py: native_cloud_coverage property + wind gust/cloud/snow in all forecasts
  • sensor.py: ArsoForecastSensor class, 4 new sensor descriptions (1 observation + 3 forecast)
  • Bump version to 2.0.5