Skip to content

Commit

Permalink
Merge pull request #19 from briis/version-1.1.0
Browse files Browse the repository at this point in the history
1.1.0 Release
  • Loading branch information
briis authored Sep 18, 2024
2 parents a7de68a + 84498f7 commit 9f1c555
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
## Release 1.0.12
## Release 1.1.0

**Date**: `NOT RELEASED`
**Date**: `2024-09-18`

### Changes

- Bumped Python to 3.12 in Devcontainer
- Added `precip_type_text` sensor, which describes what type of precipitation is measured. (No Rain, Rain or Heavy Rain/Hail)


## Release 1.0.11
Expand Down
20 changes: 20 additions & 0 deletions pyweatherflow_forecast/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,26 @@ def precip_type(self) -> str:
"""Return precipitation type."""
return self._precipitation_type

@property
def precip_type_text(self) -> str:
"""Return precipitation type."""

_default_value = "no_rain"

if self._precipitation_type is None:
self._precipitation_type = 0

mapping_text = {
"0": _default_value,
"1": "rain",
"2": "heavy_rain",
}

for key, value in mapping_text.items():
if self._precipitation_type == float(key):
return value
return _default_value

@property
def pressure_trend(self) -> str:
"""Pressure trend text."""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="pyweatherflow-forecast",
version="1.0.12",
version="1.1.0",
author="briis",
author_email="bjarne@briis.com",
description="Gets the weather forecast data from WeatherFlow",
Expand Down

0 comments on commit 9f1c555

Please # to comment.