solaredgeoptimizers icon indicating copy to clipboard operation
solaredgeoptimizers copied to clipboard

No devices or entities

Open adriederegt opened this issue 1 year ago • 3 comments

I added the integration in order to see the optimizers info in HA. I set it up with Site-ID, user en password. This was accepted but it says: No devices or entities What is going wroing here? Am I doing something wrong?

Adrie de Regt

adriederegt avatar Dec 11 '24 16:12 adriederegt

This is from the logs:

Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:366 integration: Sensor (documentation, issues) First occurred: 5:38:04 PM (3 occurrences) Last logged: 6:02:22 PM

Error while setting up solaredgeoptimizers platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/solaredgeoptimizers/sensor.py", line 97, in async_setup_entry info = await hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ my_api.requestSystemData, optimizer.optimizerId ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.13/site-packages/solaredgeoptimizers/solaredgeoptimizers.py", line 64, in requestSystemData raise errortje File "/usr/local/lib/python3.13/site-packages/solaredgeoptimizers/solaredgeoptimizers.py", line 56, in requestSystemData if json_object["lastMeasurementDate"] == "": ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ TypeError: list indices must be integers or slices, not str

adriederegt avatar Dec 11 '24 17:12 adriederegt

I'm getting this bug with a fresh install of the intergration. Not with my already installed instance.

It looks like the portal has changed and thus rendering the url i used to get the data is no longer valid :(

I'm trying to find out why and how to get the data.

ProudElm avatar Mar 20 '25 17:03 ProudElm

Looks like this had to do with the fact that there was an empty charachter (space) after the site number. Not sure how it got there. Perhaps with filling it in.

It is fixed now by trimming the input. But that change will be in an other project, not here.

Not sure if this fixes the error though with all the linked issues..

ProudElm avatar Mar 20 '25 18:03 ProudElm