Hi all,
I would like to ask you for help with sentence and intent script configuration because I am little bit lost in documentation not able to find what I need.
I have a script
for turning my climate on in given hvac_mode with given temperature (scripts.yaml):
set_climate_custom:
alias: set_climate_custom
variables:
target_entity_id: '{{ entity_id }}'
desired_temperature: '{{ temperature | default(state_attr(entity_id, ''temperature''))
}}'
target_hvac_mode: '{{ hvac_mode | default(''auto'') }}'
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: '{{ target_hvac_mode }}'
target:
entity_id: '{{ target_entity_id }}'
- service: climate.set_temperature
data:
temperature: '{{ desired_temperature }}'
target:
entity_id: '{{ target_entity_id }}'
description: Nastavení klimatizace na požadovanou teplotu
fields:
entity_id:
description: ID entity klimatizace, které se mají nastavit.
example: climate.living_room
temperature:
description: Teplota, na kterou se má klimatizace nastavit.
example: '22'
hvac_mode:
description: Požadovaný režim HVAC. Pokud není zadán, použije se 'auto'.
example: auto
icon: mdi:air-conditioner
This script is perfectly working.
Now I am trying to define conversation
and intent_script
in configuration.yaml which would trigger this script and simply confirmed it was performed. Something like:
conversation:
intents:
SetClimate:
- "Nastav klimatizaci {name} na {temperature} a režim {hvac_mode}"
lists:
hvac_mode:
values:
- in: "vypnuto"
out: "off"
- in: "auto"
out: "auto"
- in: "chlazení"
out: "cool"
- in: "topení"
out: "heat"
intent_script:
SetClimate:
speech:
text: >
Nastavuji {{ entity_id }} na teplotu {{ temperature }} a režimem HVAC {{ hvac_mode }}.
action:
- service: script.set_climate_custom
data:
entity_id: "{{ entity_id }}"
temperature: "{{ temperature }}"
hvac_mode: "{{ hvac_mode }}"
I know this is wrong configuration.
Is it possible to do it somehow in configuration.yaml? How?