Issue getting data
Closed this issue · 8 comments
This error originated from a custom integration.
Logger: homeassistant.helpers.entity
Source: custom_components/telenet_telemeter/sensor.py:426
Integration: Telenet Telemeter (documentation, issues)
First occurred: 14 March 2023 at 07:43:53 (3114 occurrences)
Last logged: 09:40:27
Update for sensor.telenet_telemeter_peak fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 541, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 739, in async_device_update
raise exc
File "/config/custom_components/telenet_telemeter/sensor.py", line 426, in async_update
self._included_volume = int((self._data._product_details.get('product').get('characteristics').get('service_category_limit').get('value'))) * 1024 * 1024
AttributeError: 'NoneType' object has no attribute 'get'
I receive data for my mobile data, but not for Internet. I have a "klik" program with no limit.
could you share your the specurl
(can be found within telemet_json
sensor attribute data.
Same issue:
specurl: https://api.prd.telenet.be/omapi/public/product/2162
specurl: https://api.prd.telenet.be/omapi/public/product/45978
PS Thanks for the HA integration!
for these products, I'm not sure how to identify the allowed volume.
I read it depends on the number of sim cards, but can't find a clear value within the product details of the shared urls.
I'll make sure it won't crash any longer, but the allowed included volume and total volume used, would remain 0 for now. Unless someone can indicate which field is to be used.
Onbeperkt mobiele data: Op voorwaarde van een normaal gebruik (zoals gedefinieerd in de algemene voorwaarden). Ook moet rekening worden gehouden met :
Een verbruiksgrens in België van 300 GB voor KLIK 1 SIM unlimited mobiele data, 600 GB voor KLIK 2 SIM’s unlimited mobiele data en 1,5 TB voor KLIK 5 SIM’s unlimited mobiele data. Indien je deze overschrijdt, kan je tot het einde van de facturatieperiode verder surfen aan een verminderde snelheid van 512 kbps;
Een verbruiksgrens in de andere landen van de EU-zone van 40 GB voor KLIK 1 SIM unlimited mobiele data, 80 GB voor KLIK 2 SIM’s unlimited mobiele data en 200 GB voor KLIK 5 SIM’s unlimited mobiele data. Indien je deze overschrijdt, kan je tot het einde van de facturatieperiode verder surfen aan normale snelheid waarbij extra verbruik bijkomend zal aangerekend worden aan 0,0018 euro (excl. btw) per MB.
Version 0.81 has a division by 0 error
This error originated from a custom integration.
Logger: homeassistant.helpers.entity
Source: custom_components/telenet_telemeter/sensor.py:264
Integration: Telenet Telemeter (documentation, issues)
First occurred: 20:31:27 (9 occurrences)
Last logged: 20:35:27
Update for sensor.telenet_telemeter fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 541, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 739, in async_device_update
raise exc
File "/config/custom_components/telenet_telemeter/sensor.py", line 264, in async_update
self._used_percentage = round(100 * ((self._peak_usage + self._wifree_usage) / ( self._included_volume + self._extended_volume)),1)
ZeroDivisionError: division by zero
This error originated from a custom integration.
Logger: homeassistant.helpers.entity
Source: custom_components/telenet_telemeter/sensor.py:438
Integration: Telenet Telemeter (documentation, issues)
First occurred: 20:31:27 (9 occurrences)
Last logged: 20:35:27
Update for sensor.telenet_telemeter_peak fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 541, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 739, in async_device_update
raise exc
File "/config/custom_components/telenet_telemeter/sensor.py", line 438, in async_update
self._used_percentage = round(100 * ((self._peak_usage + self._wifree_usage) / ( self._included_volume + self._extended_volume)),1)
ZeroDivisionError: division by zero
division by zero issue should be fixed as of r0.8.2