rsnodgrass / hass-poolmath

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

Last update killed it. #19

Closed CrallH closed 2 years ago

CrallH commented 2 years ago

Logger: homeassistant.components.sensor Source: custom_components/poolmath/sensor.py:127 Integration: Sensor (documentation, issues) First occurred: 18:11:58 (1 occurrences) Last logged: 18:11:58

poolmath: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 736, in async_device_update await task File "/config/custom_components/poolmath/sensor.py", line 127, in async_update pool = poolmath_json.get('pools')[0].get('pool') IndexError: list index out of range

rsnodgrass commented 2 years ago

Latest release (0.2.1) should now give you an ERROR message to indicate that PoolMath is not returning any pool data.

What URL did you use to configure this?

Can you go to the following and replace XXXXX with your pool id and see if it is returning all the data on your pool?

https://api.poolmathapp.com/share/XXXXX.json

rsnodgrass commented 2 years ago

Was yours working yesterday? (before this update)

CrallH commented 2 years ago

Latest release (0.2.1) should now give you an ERROR message to indicate that PoolMath is not returning any pool data.

What URL did you use to configure this?

Can you go to the following and replace XXXXX with your pool id and see if it is returning all the data on your pool?

https://api.poolmathapp.com/share/XXXXX.json

Yes that gives me all data. And yes, it worked yesterday.

CrallH commented 2 years ago

Sorry, missed this, i use this url : https://api.poolmathapp.com/share/tfp-xxccxx

CrallH commented 2 years ago

Was yours working yesterday? (before this update)

Did the new update: Felet härrör från en anpassad integration.

Logger: custom_components.poolmath.sensor Source: custom_components/poolmath/sensor.py:132 Integration: poolmath (documentation, issues) First occurred: 23:19:48 (1 occurrences) Last logged: 23:19:48

PoolMath returned NO pools for the configured URL https://api.poolmathapp.com/share/tfp-xxxxxx.json. Please confirm your URL follows PoolMath's latest https://api.... URL format and properly works in your browser.

And the link works fine in chrome giving me all values. https://api.poolmathapp.com/share/tfp-xxxxxx.json

rsnodgrass commented 2 years ago

Thanks for providing your full URL!

I figured out why it was not working for you and it works fine for me. My https://api.poolmath... URL does not have a hyphen in it so everything was working for me...and the regexp used only looked at alphanumeric. Release 0.2.2 should resolve this for you.

CrallH commented 2 years ago

Thanks for providing your full URL!

I figured out why it was not working for you and it works fine for me. My https://api.poolmath... URL does not have a hyphen in it so everything was working for me...and the regexp used only looked at alphanumeric. Release 0.2.2 should resolve this for you.

Yes i got some sensors now. I have no errors in the logs, will give some time to update to see if all sensors return. IMG_20220618_083839

Thanks for your awesome jobb!!