nqkdev / home-assistant-vacuum-styj02ym

163 stars 137 forks source link

Homekit #9

Open boscorelly opened 4 years ago

boscorelly commented 4 years ago

hi,

how to add it to homekit ?

charlesvestal commented 4 years ago

While this is not an issue with this module, here's an example config:

  filter:
    include_domains
      - vacuum
    include_entities:
      - vacuum.xiaomi_vacuum

Make sure you add the home assistant bridge to your homekit setup via the code in your home assistant notifications

The vacuum will be exposed as a switch: on is clean all, off is return to dock.

I have scripts that are also exposed as switches that allow me to trigger individual rooms.

  filter:
    include_domains
      - vacuum
      - script
    include_entities:
      - vacuum.xiaom_vacuum
      - script.clean_bedroom
      - script.clean_kitchen
      - script.clean_hallway
      - script.clean_dining_room
      - script.clean_living_room
      - script.clean_kid's_room

Where an example script is:

  alias: Clean the Bedroom
  sequence:
  - data:
      command: set_mode_withroom
      params:
      - 0
      - 1
      - 1
      - 12
    entity_id: vacuum.xiaomi_vacuum
    service: vacuum.send_command

You will then have an additional switch that will clean the room. You'll need to determine the room number (in this case 12) by sending commands to the entity itself and seeing where it starts to vacuum on your map.

DaylightMonet commented 4 years ago

@charlesvestal I don't think you understand what he wants to ask. I have the same problem, how do I adapt the homekit for this module? At present, the device can be seen in homekit but cannot be operated. Everything is good in HA. Thanks for sharing the code.

nemoyar commented 3 years ago

Where an example script is:

  alias: Clean the Bedroom
  sequence:
  - data:
      command: set_mode_withroom
      params:
      - 0
      - 1
      - 1
      - 12
    entity_id: vacuum.xiaomi_vacuum
    service: vacuum.send_command

You will then have an additional switch that will clean the room. You'll need to determine the room number (in this case 12) by >sending commands to the entity itself and seeing where it starts to vacuum on your map.

@charlesvestal And there is cleaning according to the coordinates of the zone (rectangle)?

charlesvestal commented 3 years ago

It will clean the room as defined in the native app

nemoyar commented 3 years ago

It will clean the room as defined in the native app

Not a whole room, but a separate area. This is how it doesn't work ((

`clean_carpet_in_living_room: sequence: