Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
spacemanspiff2007 committed Apr 24, 2024
1 parent edd81ca commit b2b0359
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 7 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@ sml2mqtt is a asyncio application that can read multiple sml (Smart Message Lang
from energy meters and report the values through mqtt.
The meters can be read through serial ports or through http(s) (e.g. Tibber devices)

To read from the serial port an IR to USB reader for energy meter is required.

# Documentation
[The documentation can be found at here](https://sml2mqtt.readthedocs.io)


# Changelog

#### 3.0 (2024-XX-XX)
#### 3.0 (2024-04-24)

**BREAKING CHANGE!**
**BREAKING CHANGE**

- Almost complete rewrite
- Extensive value processing which can be configured
- Support for tibber out of the box
- Almost complete rewrite, requires at least **Python 3.10**
- Extensive value processing which can be configured -> **Config file changed**
- Support for tibber pulse out of the box
- The ``analyze`` flag can also be set through an environment variable which makes it easier for docker users

#### 2.2 (2023-03-31)
- Small config improvements
Expand Down
2 changes: 1 addition & 1 deletion src/sml2mqtt/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.0.DEV-9'
__version__ = '3.0'
4 changes: 1 addition & 3 deletions src/sml2mqtt/const/date_time_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,5 @@ def calc_next(self, now: datetime | None = None) -> datetime:

while True:
next_dt += timedelta(days=1)
if (not self.dows and not self.days or
next_dt.isoweekday() in self.dows or
next_dt.day in self.days):
if not self.dows and not self.days or next_dt.isoweekday() in self.dows or next_dt.day in self.days:
break
2 changes: 1 addition & 1 deletion src/sml2mqtt/sml_value/operations/time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def on_values(self, obj: Sequence[tuple[float, float]]) -> float | None:
mean += value * duration
time += duration

if time == 0:
if time <= 0:
return None
return mean / time

Expand Down

0 comments on commit b2b0359

Please sign in to comment.