core: Hydrawise not working

The problem

Since certain time, I am unable to use my hydrawise integration. I have tried to regenerate my API key as well as increasing scan interval, and I was able to get it to work temporarily, but then it just stops. My config is following:

#Hunter Hydrawise
hydrawise:
  access_token: XYZ
  scan_interval: 90

binary_sensor:
  - platform: hydrawise

switch:
  - platform: hydrawise
    watering_minutes: 60

Following error can be observed in logs:

Logger: homeassistant.components.binary_sensor
Source: components/hydrawise/__init__.py:96
Integration: Binárny snímač (documentation, issues)
First occurred: 01:18:34 (1 occurrences)
Last logged: 01:18:34

Error while setting up hydrawise platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/hydrawise/binary_sensor.py", line 64, in setup_platform
    HydrawiseBinarySensor(hydrawise.current_controller, BINARY_SENSOR_STATUS)
  File "/usr/src/homeassistant/homeassistant/components/hydrawise/__init__.py", line 96, in __init__
    self._attr_name = f"{self.data['name']} {description.name}"
TypeError: list indices must be integers or slices, not str

What version of Home Assistant Core has the issue?

core-2023.5.3

What was the last working version of Home Assistant Core?

N/A

What type of installation are you running?

Home Assistant OS

Integration causing the issue

hydrawise

Link to integration documentation on our website

https://www.home-assistant.io/integrations/hydrawise/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 24 (5 by maintainers)

Most upvoted comments

I ran into this recently. Double check your api key. It’s either copy/pasted incorrectly or you’re being throttled by the backend.

I’m (slowly) working on migrating the integration to the new API which is much more reliable. Hoping to land all the changes by the 2023.8.0 release at the latest.

Unfortunately not.

The Prelimenary PR is still open:

https://github.com/home-assistant/core/pull/95589

As soon this is merged dknowles2 could start the work to move to the new api, but the aproval process took time.

so the new API does not have this limit?

Correct. The new api is also what both the app and the website uses.

Becaus actually if I turn on a relay I am not able to turn it off again because HA does not recognize the actual status (if the update interval is 120)

Seems plausible. I don’t know off-hand what endpoints the relay switches use but I assume they’re also rate limited. And I think the integration probably does call the throttled endpoint after a switch toggle to refresh the state, which would put you over the limit.