Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sure Petcare Felaqua - Object of type 'int' has no len() #127800

Open
R3inoudR opened this issue Oct 7, 2024 · 2 comments
Open

Sure Petcare Felaqua - Object of type 'int' has no len() #127800

R3inoudR opened this issue Oct 7, 2024 · 2 comments

Comments

@R3inoudR
Copy link

R3inoudR commented Oct 7, 2024

The problem

When intergrating the Sure Petcare Felaqua it cannot be added because of error message "Object of type 'int' has no len(). I tried removing the intergration and adding it again, but without result.

What version of Home Assistant Core has the issue?

2024.10.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

surepetcare

Link to integration documentation on our website

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

Diagnostics information

Unexpected error fetching surepetcare data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/surepetcare/coordinator.py", line 61, in _async_update_data
    return await self.surepy.get_entities(refresh=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/surepy/__init__.py", line 400, in get_entities
    await self.get_latest_anonymous_drinks(household_id=household_id)
  File "/usr/local/lib/python3.12/site-packages/surepy/__init__.py", line 216, in get_latest_anonymous_drinks
    household_timeline = await self.get_household_timeline(household_id, entries=50)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/surepy/__init__.py", line 266, in get_household_timeline
    if timeline := await self.sac.call(method="GET", resource=resource):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/surepy/client.py", line 286, in call
    responselen = len(response_data.get("data", 0))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'int' has no len()

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Oct 7, 2024

Hey there @benleb, @Danielhiversen, mind taking a look at this issue as it has been labeled with an integration (surepetcare) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of surepetcare can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign surepetcare Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


surepetcare documentation
surepetcare source
(message by IssueLinks)

@benleb
Copy link
Contributor

benleb commented Oct 7, 2024

oh… maybe a problem in my surepy lib 🙄 it really needs a rewrite 🫣
will have a closer look later today or tomorrow ✊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants