core icon indicating copy to clipboard operation
core copied to clipboard

Roborock integration: unsupported operand type(s) for /: 'list' and 'int'

Open jsamr opened this issue 1 year ago • 3 comments

The problem

A couple of times a day, I can see this message in the logs: "unsupported operand type(s) for /: 'list' and 'int'" (see full trace below).

What version of Home Assistant Core has the issue?

core-2024.8.2

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

Roborock

Link to integration documentation on our website

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

Diagnostics information

config_entry-roborock-b5d0f126107b75aa00822af054489b2a.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

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/roborock/coordinator.py", line 109, in _async_update_data
    await asyncio.gather(*(self._update_device_prop(), self.get_rooms()))
  File "/usr/src/homeassistant/homeassistant/components/roborock/coordinator.py", line 99, in _update_device_prop
    device_prop = await self.api.get_prop()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_client_v1.py", line 266, in get_prop
    status, clean_summary, consumable = await asyncio.gather(
                                        ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_client_v1.py", line 186, in get_clean_summary
    return CleanSummary(
           ^^^^^^^^^^^^^
  File "<string>", line 10, in __init__
  File "/usr/local/lib/python3.12/site-packages/roborock/containers.py", line 615, in __post_init__
    self.square_meter_clean_area = round(self.clean_area / 1000000, 1) if self.clean_area is not None else None
                                         ~~~~~~~~~~~~~~~~^~~~~~~~~
TypeError: unsupported operand type(s) for /: 'list' and 'int'


### Additional information

_No response_

jsamr avatar Aug 24 '24 21:08 jsamr