Skip to content

Commit

Permalink
bump version to v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-manuel committed Mar 14, 2023
1 parent 70a9290 commit cc602be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v1.0.1
* Changed: Corrected descriptions in the full JSON structure
* Changed: Fixed division by zero when Current = 0 during calculation of Time-to-Go or Voltage = 0 during calculation of Current

## v1.0.0
* Added: A lot of new values that can be set, check the full [JSON structure](https://github.com/mr-manuel/venus-os_dbus-mqtt-battery#json-structure) in the `README.md` for details
* Added: Device name can be changed in the `config.ini`
Expand Down
4 changes: 2 additions & 2 deletions dbus-mqtt-battery/dbus-mqtt-battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def on_message(client, userdata, msg):

# calculate possible values if missing
if 'Current' not in jsonpayload['Dc']:
battery_dict['/Dc/0/Current']['value'] = round( ( battery_dict['/Dc/0/Power']['value'] / battery_dict['/Dc/0/Voltage']['value'] ), 3 )
battery_dict['/Dc/0/Current']['value'] = round( ( battery_dict['/Dc/0/Power']['value'] / battery_dict['/Dc/0/Voltage']['value'] ), 3 ) if battery_dict['/Dc/0/Voltage']['value'] != 0 else 0

if (
'Capacity' not in jsonpayload
Expand Down Expand Up @@ -347,7 +347,7 @@ def __init__(
self._dbusservice.add_path('/ProductId', 0xFFFF)
self._dbusservice.add_path('/ProductName', productname)
self._dbusservice.add_path('/CustomName', customname)
self._dbusservice.add_path('/FirmwareVersion', '1.0.0')
self._dbusservice.add_path('/FirmwareVersion', '1.0.1')
#self._dbusservice.add_path('/HardwareVersion', '')
self._dbusservice.add_path('/Connected', 1)

Expand Down

0 comments on commit cc602be

Please sign in to comment.