Skip to content

Commit

Permalink
#49 default 'unknown' values instead of 0 to keep clean history after…
Browse files Browse the repository at this point in the history
… HA reboots
  • Loading branch information
myTselection committed Sep 21, 2024
1 parent 89f3863 commit e01d07e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion custom_components/telenet_telemeter/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/myTselection/telenet_telemeter/issues",
"requirements": ["beautifulsoup4", "html5lib"],
"version": "1.6.1"
"version": "1.6.2"
}
50 changes: 25 additions & 25 deletions custom_components/telenet_telemeter/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,27 +255,27 @@ def __init__(self, data, hass):
self._data = data
self._hass = hass
self._last_update = None
self._used_percentage = 0
self._used_percentage = None
self._period_start_date = None
self._period_end_date = None
tz_info = None
self._period_length = 0
self._period_left = 0
self._period_used = 0
self._total_volume = 0
self._included_volume = 0
self._extended_volume = 0
self._wifree_usage = 0
self._includedvolume_usage = 0
self._extendedvolume_usage = 0
self._period_used_percentage = 0
self._period_length = None
self._period_left = None
self._period_used = None
self._total_volume = None
self._included_volume = None
self._extended_volume = None
self._wifree_usage = None
self._includedvolume_usage = None
self._extendedvolume_usage = None
self._period_used_percentage = None
self._product = None
self._download_speed = 0
self._upload_speed = 0
self._peak_usage = 0
self._offpeak_usage = 0
self._download_speed = None
self._upload_speed = None
self._peak_usage = None
self._offpeak_usage = None
self._squeezed = False
self._modemMac = ""
self._modemMac = None
self._wifiEnabled = None
self._wifreeEnabled = None

Expand Down Expand Up @@ -513,17 +513,17 @@ def __init__(self, data, hass):
self._peak = None
self._servicecategory = None

self._download_speed = 0
self._upload_speed = 0
self._download_speed = None
self._upload_speed = None

self._used_percentage = 0
self._peak_usage = 0
self._offpeak_usage = 0
self._wifree_usage = 0
self._used_percentage = None
self._peak_usage = None
self._offpeak_usage = None
self._wifree_usage = None

self._included_volume = 0
self._extended_volume = 0
self._total_volume = 0
self._included_volume = None
self._extended_volume = None
self._total_volume = None
self._squeezed = False


Expand Down

0 comments on commit e01d07e

Please sign in to comment.