TypeError: object of type 'int' has no len()
hi any ideas with this error?
Logger: homeassistant.components.surepetcare Source: components/surepetcare/init.py:190 Integration: Sure Petcare (documentation, issues) First occurred: 18:50:30 (3 occurrences) Last logged: 18:50:48
Unexpected error fetching surepetcare data: object of type 'int' has no len() Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/components/surepetcare/init.py", line 190, in _async_update_data return await self.surepy.get_entities(refresh=True) File "/usr/local/lib/python3.10/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.10/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.10/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.10/site-packages/surepy/client.py", line 281, in call responselen = len(response_data.get("data", 0)) TypeError: object of type 'int' has no len()
Same here.
2023-08-17 17:28:11.512 ERROR (MainThread) [custom_components.sureha] Unexpected error fetching sureha_sensors data: object of type 'int' has no len()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 242, in _async_update_data
return await self.update_method()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/sureha/__init__.py", line 98, in async_update_data
return await spc.surepy.get_entities(refresh=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/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.11/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.11/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.11/site-packages/surepy/client.py", line 281, in call
responselen = len(response_data.get("data", 0))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'int' has no len()
+1
should be fixed with #59 (new surepy libary version)