Google Assistant, IFTTT, Xiaomi VAC

So i followed this guide for getting Voice commands for the Vac.

I have completely gotten the vac to clean zones through HA commands. It also seems like the command is getting to HA via IFTTT, but it doesnt run anything.

Errors i am getting:

[homeassistant.components.http.auth] You need to use a bearer token to access /api/services/script/vacuum_room_select from X.X.X.X
[homeassistant.components.http.view] Serving /api/services/script/vacuum_room_select to X.X.X.X (auth: True)       

Script it is calling:

vacuum_room_select:
      sequence:
        - service: script.turn_on
          data_template:
            entity_id: >
              {% if (room== "kitchen") %}
                script.vacuum_kitchen
              {% elif (room== "living room") %}
                script.vacuum_living_room
              {% elif (room== "pantry") %}
                script.vacuum_pantry                
              {% elif (room== "dining room") %}
                script.vacuum_dining_room
              {% elif (room== "spare bedroom") %}
                script.vacuum_spare_bedroom
              {% elif (room== "spare bathroom") %}
                script.vacuum_spare_bathroom
              {% elif (room== "computer room") %}
                script.vacuum_computer_room
              {% elif (room== "front bathroom") %}
                script.vacuum_front_bathroom
              {% elif (room== "entry hall") %}
                script.vacuum_entry_hall
              {% endif %}

vacuum_kitchen:
      alias: "Vacuum the Kitchen"
      sequence:
        - service: vacuum.send_command
          data:
            entity_id: vacuum.rosy
            command: app_zoned_clean
            params: [[22500, 30000, 28500, 33750, 2]]

IFTTT Setup

IFTTT Log:

Unable to make web request. Your server returned a 400

You need to use the legacy API authentication to use this, OR change it to use an access token that you have to generate.

Check out this Link.

Yeah, i have that setup with the legacy API. It seems like the command is good. Do i need port 443 forwarded to HA. I guess it seems like my auth is accepted, but HA is returning data as bad according to IFTTT

Hey man i figured it out, turns out when i copied your text it made the quotes slanted. When i changed them to normal " sign, it worked perfectly.

1 Like