First adventures into the world of Assist
This commit is contained in:
34
custom_sentences/en/computers.yaml
Normal file
34
custom_sentences/en/computers.yaml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
language: "en"
|
||||||
|
|
||||||
|
intents:
|
||||||
|
BootComputers:
|
||||||
|
data:
|
||||||
|
- sentences:
|
||||||
|
- "{action} the computer for {person}"
|
||||||
|
- "{action} {person}'s computer"
|
||||||
|
|
||||||
|
lists:
|
||||||
|
person:
|
||||||
|
values:
|
||||||
|
- in: "tony"
|
||||||
|
out: "tony_desktop"
|
||||||
|
- in: "tina"
|
||||||
|
out: "tina_desktop"
|
||||||
|
- in: "christina"
|
||||||
|
out: "tina_desktop"
|
||||||
|
- in: "kallen"
|
||||||
|
out: "kallen_desktop"
|
||||||
|
- in: "collin"
|
||||||
|
out: "kallen_desktop"
|
||||||
|
action:
|
||||||
|
values:
|
||||||
|
- in: "boot"
|
||||||
|
out: "wake"
|
||||||
|
- in: "boot up"
|
||||||
|
out: "wake"
|
||||||
|
- in: "turn on"
|
||||||
|
out: "wake"
|
||||||
|
- in: "shut down"
|
||||||
|
out: "shutdown"
|
||||||
|
- in: "turn off"
|
||||||
|
out: "shutdown"
|
22
custom_sentences/en/media.yaml
Normal file
22
custom_sentences/en/media.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
language: "en"
|
||||||
|
|
||||||
|
intents:
|
||||||
|
SetVolume:
|
||||||
|
data:
|
||||||
|
- sentences:
|
||||||
|
- "(set|change) {media_player} volume to {volume} [percent]"
|
||||||
|
- "(set|change) [the] volume for {media_player} to {volume} [percent]"
|
||||||
|
|
||||||
|
lists:
|
||||||
|
media_player:
|
||||||
|
values:
|
||||||
|
- in: "living room tv"
|
||||||
|
out: "media_player.living_room_tv"
|
||||||
|
- in: "basement tv"
|
||||||
|
out: "media_player.basement_tv"
|
||||||
|
- in: "master bedroom tv"
|
||||||
|
out: "media_player.master_bedroom_firetv"
|
||||||
|
volume:
|
||||||
|
range:
|
||||||
|
from: 0
|
||||||
|
to: 100
|
7
custom_sentences/en/responses.yaml
Normal file
7
custom_sentences/en/responses.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
language: "en"
|
||||||
|
responses:
|
||||||
|
intents:
|
||||||
|
HassTurnOn:
|
||||||
|
default: "I have turned on the {{ slots.name }}"
|
||||||
|
HassTurnOff:
|
||||||
|
default: "I have turned off the {{ slots.name }}"
|
27
packages/assist.yaml
Normal file
27
packages/assist.yaml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
intent_script:
|
||||||
|
SetVolume:
|
||||||
|
action:
|
||||||
|
service: "media_player.volume_set"
|
||||||
|
data:
|
||||||
|
entity_id: "{{ media_player }}"
|
||||||
|
volume_level: "{{ volume / 100.0 }}"
|
||||||
|
speech:
|
||||||
|
text: "Volume changed to {{ volume }}"
|
||||||
|
|
||||||
|
BootComputers:
|
||||||
|
action:
|
||||||
|
service: "script.{{person}}_{{action}}"
|
||||||
|
speech:
|
||||||
|
text: >
|
||||||
|
{% if person == "tony_desktop" %}
|
||||||
|
{% set computer = "tony's computer" %}
|
||||||
|
{% elif person == "tina_desktop" %}
|
||||||
|
{% set computer = "tina's computer" %}
|
||||||
|
{% elif person == "kallen_desktop" %}
|
||||||
|
{% set computer = "collin's computer" %}
|
||||||
|
{% endif %}
|
||||||
|
{% if action == "wake" %}
|
||||||
|
{{ computer }} is now booting up
|
||||||
|
{% elif action == "shutdown" %}
|
||||||
|
{{ computer }} is shutting down
|
||||||
|
{% endif %}
|
Reference in New Issue
Block a user