Roomba with Homekit (how to integrate?)

Has anyone successfully integrated Roomba in Homekit yet? I integrated Roomba in Home Assistant and can toggle the robot via a card on home but it is not showing up in Homekit. All others do. Any ideas?

entity: vacuum.roomba
hold_action:
action: more-info
show_icon: true
show_name: true
tap_action:
action: toggle
type: entity-button

Thank you for your help.

I guess that it’s not possible. See: https://www.home-assistant.io/components/homekit/#supported-components

Thank you for the link. Hope that will change.

Wow that explains why my vacuum is in HA but now HomeKit. Is there a way to have the vacuum appear as a switch?

You could create a script to run your vacuum and a script to stop it. Then make a switch and import it into homekit.

You can do this easily with a template switch. Change the entity_id to be whatever your Roomba us, and then expose the homekit_vacuum_bedroom in your HomeKit config section.

switch:
  - platform: template
    switches:
      homekit_vacuum_bedroom:
        friendly_name: "Bedroom Vacuum"
        value_template: '{{ is_state("vacuum.bedroom_roomba", "on") }}'
        turn_on:
          service: vacuum.turn_on
          data:
            entity_id: vacuum.bedroom_roomba
        turn_off:
          service: vacuum.return_to_base
          data:
            entity_id: vacuum.bedroom_roomba
1 Like

One other piece I just added in my own config is the battery level of the Roomba, since the HomeKit component now includes a linked_battery_sensor option. I do this by:

  1. Creating a template sensor for the Roomba’s battery:
sensor:
  - platform: template
    sensors:
      homekit_vacuum_bedroom_battery:
        friendly_name: "Bedroom Vacuum Battery"
        device_class: battery
        value_template: "{{ state_attr('vacuum.bedroom_roomba', 'battery_level') }}"
  1. Linking that sensor to the Roomba’s switch in your HomeKit config:
homekit:
  <all your existing crap>
  entity_config:
    switch.homekit_vacuum_bedroom:
      linked_battery_sensor: sensor.homekit_vacuum_bedroom_battery

Note that you’ll need to reset the vacuum’s switch via the homekit.reset_accessory in order for HomeKit to realize the vacuum switch has now changed and has a battery value.

I’ve added my roborock as a template fan to HA. This way I can change the cleaning strength. Don’t know if that will also work for roomba

Hi,
I have this config not working:

homekit:

    entity_config:
      - switch.homekit_vacuum_roomba:
           linked_battery_sensor: sensor.homekit_vacuum_roomba_battery
        type: switch

can you help me to fix this code?

I don’t think entity_config takes an array – you need to remove the - in front of switch.homekit_vacuum_roomba perhaps? I don’t have them on my config.

Also note sure where the type: switch part came from. I found it necessary to create a template switch as described in the earlier post. If you do that, you don’t need to add type: switch anywhere.

Late response, but if it’s of assistance to anyone… this works for me. The homekit card doesn’t directly show the battery percentage, but if you open the details it’s there.

homekit:
  auto_start: false
  filter:
    include_domains:
      - input_boolean
      - vacuum
  entity_config:
    vacuum.roomba:
      linked_battery_sensor: sensor.battery_roomba

The sensor:

  - platform: template
    sensors:
      battery_roomba:
        friendly_name: 'vac batt'
        device_class: battery
        value_template: "{{ states.vacuum.roomba.attributes.battery_level }}"
        unit_of_measurement: '%'

Here is a custom_button template that shows the percentage and lets you control start, pause, and RTB (in HA, not HK).

vacuum:
  icon: mdi:robot-vacuum
  show_state: true
  show_name: false
  show_label: true
  color: yellow
#  confirmation:
#    text: "[[[ return 'clean up this pig sty?' ]]]"
  lock: 
    enabled: true
  label: >
    [[[
      return 'batt:' + states['sensor.battery_roomba'].state + '%';
    ]]]
  state_display: >
    [[[
      return states['vacuum.roomba'].attributes.status;
    ]]]
  tap_action:
    action: call-service
    service: vacuum.start
    haptic: success
    service_data:
      entity_id: vacuum.roomba
  hold_action:
    action: call-service
    service: vacuum.pause
    haptic: success
    service_data:
      entity_id: vacuum.roomba
  double_tap_action:
    action: call-service
    service: vacuum.return_to_base
    haptic: success
    service_data:
      entity_id: vacuum.roomba
  aspect_ratio: 1.73/1
  size: 45%
  styles:
    card:
      - background-color: rgb(100, 100, 100, 0.6)
      - box-shadow: 0px 0px 5px 3px rgba(0, 138, 230, 1)
    grid:
      - grid-template-areas: '"i" "s" "l"'
      - grid-template-columns: 1fr
      - grid-template-rows: 1fr min-content min-content
    img_cell:
      - align-self: start
      - text-align: start
    name:
      - justify-self: center
      - padding-left: 2px
      - font-weight: bold
      - font-size: 14px
    state:
      - justify-self: center
      - padding-left: 2px
      - font-weight: bold
      - font-size: 14px
      - text-transform: lowercase
      - icon_color: var(--button-card-light-color)
    label:
      - justify-self: center
      - padding-left: 4px
      - font-weight: bold
      - font-size: 14px
  state:
    - value: 'docked'
      styles:
        name:
          - filter: opacity(50%)
        state:
          - filter: opacity(50%)
        icon:
          - filter: opacity(50%)
          - color: var(--button-card-light-color)
        label: 
          - filter: opacity(50%)
        card:
          - box-shadow: 0px 0px 5px 3px rgba(170, 170, 170, 1)
          - background-color: rgb(80, 80, 80, 0.4)

Hello guys,

thanks for your work.
I’m also looking to integrate my Roomba vacuum with HomeKit.
I looked at your scripts, but I don’t see where to add them.
Could you tell me which steps to reproduce to add your scripts?

THANKS