myTselection / telenet_telemeter

Telenet Telemeter Home Assistant custom component HACS for Belgian ISP and mobile phone network traffic.
MIT License
31 stars 7 forks source link

Since 0.6.0 the sensors became unavailable #13

Closed sammyke007 closed 1 year ago

sammyke007 commented 1 year ago

Since 0.6.0, the sensor sensor.telenet_telemeter doens't retrieve the attributes correctly anymore (JSON):

image

I have a WIGO 35GB and it used to show almost completeley OK before.

sensor.telenet_telemeter_mobile_shared shows correct. The individual mobile number sensors (I have 5) don't show correct.

Log:

`` Deze fout is ontstaan door een aangepaste integratie.

Logger: homeassistant.helpers.entity Source: custom_components/telenet_telemeter/sensor.py:486 Integration: Telenet Telemeter (documentation, issues) First occurred: 07:57:58 (185 occurrences) Last logged: 08:15:58

Update for sensor.telenet_telemeter_mobile_0485xxxxxx fails Update for sensor.telenet_telemeter_mobile_0477xxxxxx fails Update for sensor.telenet_telemeter_mobile_0486xxxxxx fails Update for sensor.telenet_telemeter_mobile_0486xxxxxx fails Update for sensor.telenet_telemeter_mobile_0478xxxxxx fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 736, in async_device_update raise exc File "/config/custom_components/telenet_telemeter/sensor.py", line 486, in async_update if unassignesub.get('included').get('data'): AttributeError: 'NoneType' object has no attribute 'get' ``

`` Deze fout is ontstaan door een aangepaste integratie.

Logger: homeassistant.helpers.entity Source: custom_components/telenet_telemeter/sensor.py:221 Integration: Telenet Telemeter (documentation, issues) First occurred: 07:57:59 (37 occurrences) Last logged: 08:15:58

Update for sensor.telenet_telemeter fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 538, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 736, in async_device_update raise exc File "/config/custom_components/telenet_telemeter/sensor.py", line 221, in async_update self._download_speed = str(self._data._product_details.get('product').get('services')[0].get('specifications')[1].get('value')) + ' ' + self._data._product_details.get('product').get('services')[0].get('specifications')[1].get('unit') TypeError: can only concatenate str (not "NoneType") to str ``

myTselection commented 1 year ago

Thanks for reporting! Will check how I can add extra validations to overcome this. btw, would prefer if you'd remove any personal info (eg phone numbers) before posting publicly.

sammyke007 commented 1 year ago

I'll update later today. Tnx for looking into this so quick! Ive removed personal data indeed, stupid of me...

myTselection commented 1 year ago

if it would still occur, I'll need to look into your specific data. Please share the telemeter_json and mobile_json attributes if these would be available. If you prefer to not share it publicly, you may also send it by mail to mytselection[@]gmail.com

sammyke007 commented 1 year ago

Update fixed it! Only upload speed and download speed is incorrect (should be 300/20), but no big problem for me.

image

myTselection commented 1 year ago

I see, thx for feedback, I'll check the down/up speed attributes again, I tought I had fixed it but will require a different approach