Error adding entities for domain sensor with platform linksys_velop
Closed this issue · 5 comments
Maybe this issue is because my router is a Linksys AC2200 Smart Mesh Wi-Fi Router (model: MR8300v1, firmware: 1.1.8.203202) and it has a child Linksys Velop Mesh Router (model: WHW03Bv2, firmware: 2.1.18.206964) used to expand my Wi-Fi coverage.
It does the device tracker wonderfully, which is what I mostly wanted. Just thought I would share about these errors.
I get this error after each restart.
Logger: homeassistant.components.sensor
Source: custom_components/linksys_velop/entity_helpers.py:79
Integration: Sensor (documentation, issues)
First occurred: 8:15:11 PM (2 occurrences)
Last logged: 8:15:11 PM
Error adding entities for domain sensor with platform linksys_velop
Error while setting up linksys_velop platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 457, in _async_add_entity
device_info = entity.device_info
File "/config/custom_components/linksys_velop/entity_helpers.py", line 79, in device_info
"sw_version": node.firmware.get("version", ""),
File "/usr/local/lib/python3.9/site-packages/pyvelop/base.py", line 29, in getattribute
ret = object.getattribute(self, item)
File "/usr/local/lib/python3.9/site-packages/pyvelop/node.py", line 46, in firmware
available_updates = self.__attributes.get("updates", {}).get("availableUpdate", {})
AttributeError: 'list' object has no attribute 'get'
Hi,
I have a feeling I know what the issue is. However, if I give you the request that I use would you be able to run it against your router, using Postman, and share the results please?
In fact this could probably be done using some debug logging.
You should be able to turn on debug logging by putting the following in the configuration.yaml
. You will need to restart mind you.
logger:
default: info
logs:
custom_components.linksys_velop: debug
pyvelop: debug
The logs will then appear in you Home Assistant log file.
I'll take a look at them and see what I can find.
No problem. Drop me a note when you're in a position to test. The debug should be enough - we can ignore Postman unless I don't get everything from the debug that I need.