PiotrMachowski / lovelace-xiaomi-vacuum-map-card

This card provides a user-friendly way to fully control map-based vacuums in Home Assistant. Supported brands include Xiaomi (Roborock/Viomi/Dreame/Roidmi/Valetudo/Valetudo RE), Neato, Wyze, Roomba, Ecovacs (and probably more).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Passing coroutines" error while performing vacuum_clean_segment command

itsredan97 opened this issue · comments

Checklist

  • I have updated the card to the latest version available
  • I have cleared the cache of my browser
  • I have checked if the problem is already reported

The problem

Hi everybody,

After struggling finding the right integration to add my Xiaomi Mop P Vacuum's funcions to the card (I found out that the easiest way to do so is using KrzysztofHajdamowicz/miio2), I'm still having problems while launching vacuum_clean_segment command, after choosing the room to clean, obtaining this error:

Passing coroutines is forbidden, use tasks explicitly. Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/miio2/vacuum.py", line 231, in async_service_handler await asyncio.wait(update_tasks) File "/usr/local/lib/python3.11/asyncio/tasks.py", line 425, in wait raise TypeError("Passing coroutines is forbidden, use tasks explicitly.") TypeError: Passing coroutines is forbidden, use tasks explicitly.

Even with that, the cleaning process seems to start, but it looks like that what is performing is a normal clean, ignoring the room selection.

Is there any way to figure out what's wrong in my configuration?

Many thanks in advance!

What version of a card has described problem?

v2.2.2

What was the last working version card?

No response

What vacuum model do you have problems with?

Xiaomi Mop P

Which integration do you use to control your vacuum (link)?

https://github.com/KrzysztofHajdamowicz/home-assistant-vacuum-styj02ym

What browser (browsers/apps) does have this problem?

Chrome

What version of Home Assistant do you use?

2023.12.1

What type of installation are you running?

Home Assistant OS

Card's configuration

type: custom:xiaomi-vacuum-map-card
map_source:
  camera: camera.xiaomi_cloud_map_extractor
  crop:
    top: 420
    left: 400
    right: 350
    bottom: 400
calibration_source:
  camera: true
entity: vacuum.xiaomi_mop_p
vacuum_platform: KrzysztofHajdamowicz/miio2
map_modes:
  - template: vacuum_clean_zone
    name: Pulizia Zone
  - template: vacuum_goto
    name: Vai a
  - template: vacuum_clean_segment
    name: Stanze
    max_selections: 1
    max_repeats: 3
    predefined_selections:
      - id: '10'
        icon:
          name: mdi:bathtub
          x: -1.775
          'y': 0.27499999999999997
        label:
          text: Bagno
          x: -1.775
          'y': 0.27499999999999997
          offset_y: 35
        outline:
          - - -3
            - -0.65
          - - -0.3
            - -0.65
          - - -0.3
            - 1.2
          - - -3
            - 1.2
      - id: '11'
        icon:
          name: mdi:bed
          x: 3.075
          'y': -1.625
        label:
          text: Camera Mamma
          x: 3.075
          'y': -1.625
          offset_y: 35
        outline:
          - - 0.9
            - -3.8
          - - 5.25
            - -3.8
          - - 5.25
            - 0.55
          - - 0.9
            - 0.55
      - id: '12'
        icon:
          name: mdi:floor-plan
          x: 0.3
          'y': 0.20000000000000007
        label:
          text: Corridoio
          x: 0.3
          'y': 0.20000000000000007
          offset_y: 35
        outline:
          - - -0.25
            - -0.7
          - - 0.85
            - -0.7
          - - 0.85
            - 1.1
          - - -0.25
            - 1.1
      - id: '13'
        icon:
          name: mdi:bed
          x: -1.225
          'y': -2.7
        label:
          text: Camera Andrea
          x: -1.225
          'y': -2.7
          offset_y: 35
        outline:
          - - -3.1
            - -4.55
          - - 0.65
            - -4.55
          - - 0.65
            - -0.75
          - - -3.1
            - -0.75
title: Robot Primo Piano
map_locked: true

Javascript errors shown in the browser's console (if applicable)

No response

Additional information

No response

This is not a bug in the card, but in the integration. Install the latest version from master branch - it should be fixed there