I’ve written you an email, but since it was from noreply it bumped. Anyway - here’s copy paste without attachment, obviously… Give me any contact to you to get pdfs.
Hmmm… It will be quite hard to explain dialogflow, but I’ll try it when I login again there. Meanwhile here is example of vacuuming
-
be sure to use haas,io plugin (unless you have public IP and ports forwarded accordingly)
-
In your configuration.yaml include:
dialogflow:
intent_script: !include intent_scripts.yaml
- In my intent_scripts.yaml I have a few of these entries
clean_area:
action: # obiekt action to tablica, zaawierajaca obiekty z polami "data" i "service"
- data_template:
entity_id: >
{% if (location== "the living room") %}
script.vacuum_living_room
{% elif (location== "master bedroom") %}
script.vacuum_bedroom
{% elif (location== "ann's bedroom") %}
script.vacuum_lenas_bedroom
{% elif (location== "john's bedroom") %}
script.vacuum_igors_bedroom
{% elif (location== "bathroom") %}
script.vacuum_bathroom
{% elif (location== "small bathroom") %}
script.vacuum_small_bathroom
{% elif (location== "corridor") %}
script.vacuum_corridor
{% endif %}
service: script.turn_on
- in scripts I gave vacuum_living_room that is used in 3)
vacuum_living_room:
alias: Vacuum living room
sequence:
- data:
entity_id: vacuum.xiaomi_vacuum_cleaner
repeats: '1'
zone: [[17909,30445,24417,35688]]
service: vacuum.xiaomi_clean_zone
-
as for intents, which you require - do find some tutorial, as I don’t feel competent enough to give all details.You have to supply your webhook in fulfilment section of dialog flow console, for sure. Then when you have your intents ready, observe what do you get in Home Assistan log. You should set content-type in fullfilment to json.
-
intents are complicated to explain, but easy when you learn them. For my vacuuming I have “clean” and “clean area” intents. Plus “location_confession” intent that can create a context for “clean” intent. So it works in 3 possible ways"
a) “please clean the living room” (uses clean_area intent)
b) “I’m in the living room” (uses location_confession intent that has location_context as output - defined on top of page in output context) “plase clean this mess” (uses clean intent plus existing Location_context that holds “living room”)
c) “clean here” (uses clean intent, but doesn’t have location_context so it asks “where?” - you define it in “actions and parameters” section)
I’m attaching screenshots in pdf, maybe they will help?