Skip to content

Commit

Permalink
Release 1.3.1 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
natekspencer authored Jun 1, 2022
1 parent de6cf96 commit b1a58fc
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# unreleased
# 1.3.1 (2022-06-01)

- Handle up_since oscillation on devices
- Rename private initialization variables in device class for clarity
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[![pypi](https://img.shields.io/pypi/v/pyweatherflowudp?style=for-the-badge)](https://pypi.org/project/pyweatherflowudp)
[![downloads](https://img.shields.io/pypi/dm/pyweatherflowudp?style=for-the-badge)](https://pypi.org/project/pyweatherflowudp)
[![Buy Me A Coffee/Beer](https://img.shields.io/badge/Buy_Me_A_☕/🍺-F16061?style=for-the-badge&logo=ko-fi&logoColor=white&labelColor=grey)](https://ko-fi.com/natekspencer)

# pyweatherflowudp

An event-based asynchronous library to read UDP packets from Weatherflow weather systems on a local network without any reliance on the cloud.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyweatherflowudp"
version = "1.3.0"
version = "1.3.1"
description = "An event-based asynchronous library to read UDP packets from Weatherflow weather systems on a local network without any reliance on the cloud."
license = "MIT"
authors = ["Nathan Spencer <natekspencer@gmail.com>"]
Expand Down
2 changes: 1 addition & 1 deletion pyweatherflowudp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Asynchronous library to read UDP Packets from Weatherflow weather systems."""
__version__ = "1.3.0"
__version__ = "1.3.1"
2 changes: 1 addition & 1 deletion pyweatherflowudp/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ def parse_device_status(self, data: dict[str, Any]) -> None:
"""Parse the device status."""
old_up_since = (self._timestamp or 0) - self._uptime
self._timestamp = data.get(DATA_TIMESTAMP)
assert self._timestamp
self._uptime = data.get(DATA_UPTIME, 0)
# Tempest devices seem to have a timestamp/uptime combo that oscillates +/- a few seconds.
# Attempt to correct this by adjusting the uptime if the difference is less than 60 seconds.
Expand All @@ -299,7 +300,6 @@ def parse_device_status(self, data: dict[str, Any]) -> None:
self._initial_status_complete = True
self._send_load_complete_event()

assert self._timestamp
self.emit(
EVENT_STATUS_UPDATE, CustomEvent(self._timestamp, EVENT_STATUS_UPDATE)
)
Expand Down
2 changes: 1 addition & 1 deletion test/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

def test_version() -> None:
"""Test version."""
assert __version__ == "1.3.0"
assert __version__ == "1.3.1"

0 comments on commit b1a58fc

Please sign in to comment.