rsnodgrass / hass-poolmath

Pool Math for Home Assistant
Other
30 stars 9 forks source link

Error setting up platform after install #3

Closed jmc2010 closed 4 years ago

jmc2010 commented 4 years ago

Thank you for putting together this integration for Home Assistant. I'm looking forward to using it this season. I added the integration through HACS, and added the YAML to the configuration, but am getting an error when I restart the server. I checked the custom_components folder, and the file for Pool Math are there. Here is the log entry:

Logger: homeassistant.components.sensor
Source: custom_components/poolmath/sensor.py:72
Integration: Sensor (documentation, issues)
First occurred: 10:31:18 PM (1 occurrences)
Last logged: 10:31:18 PM

Error while setting up poolmath platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/poolmath/sensor.py", line 50, in setup_platform
    client = PoolMathClient(config, add_entities)
  File "/config/custom_components/poolmath/sensor.py", line 72, in __init__
    pool_name = self._raw_data.select('h1')[0].string
IndexError: list index out of range

Not sure what I did wrong. I did subscribe to the premium service, and received my custom URL which I used in the config.

Thanks,

Jason

rsnodgrass commented 4 years ago

Jason, did you have a name for your pool defined on PoolMath? It appears it cannot get the name of the pool for some reason. I have updated the sensor with handling of a case where it cannot find a name for the pool and just released it.

First try the updated hass-poolmath sensor (0.0.2) and see if that resolves your problem. Then if that doesn't work, make sure you set a name for your pool on the Pool Math site.

jmc2010 commented 4 years ago

I do have the pool named, at least in the android app. I do see that the 24 hour SWG chlorine output isn't saving the input of .625. Not sure if that could be an issue. I will try the update and see if that helps.

Thanks,

Jason

On Fri, Mar 27, 2020 at 11:49 AM Ryan notifications@github.com wrote:

Jason, did you have a name for your pool defined on PoolMath? It appears it cannot get the name of the pool for some reason. I have updated the sensor with handling of a case where it cannot find a name for the pool and just released it.

First try the updated hass-poolmath sensor (0.0.2) and see if that resolves your problem. Then if that doesn't work, make sure you set a name for your pool on the Pool Math site.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rsnodgrass/hass-poolmath/issues/3#issuecomment-605105636, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGE3KZZFZZDSDXSDJW63CALRJTKK5ANCNFSM4LUWYTUQ .

jmc2010 commented 4 years ago

That did it! Thank you for the help.

Jason