Now that i think about it…
I’m still using haaska for my tv volume control and crap.
IIRC you also need to have home assistant responding to your tests. Otherwise the test will not work.
This is an example of my automations with alexa:
Intents:
{
"intents": [
{
"intent": "LocateIntent",
"slots": [ { "name": "User", "type": "Users" } ]
},
{
"intent": "WhereAreWeIntent",
"slots": []
},
{
"intent": "RunScriptIntent",
"slots": [ { "name" : "Script", "type" : "Scripts" } ]
},
{
"intent": "ActivateSceneIntent",
"slots": [ { "name" : "Scene", "type" : "Scenes" } ]
},
{
"intent": "QuestionPersonIntent",
"slots": [ { "name" : "Person", "type" : "Persons" } ]
},
{
"intent": "SetVolumeIntent",
"slots": [ { "name" : "Level", "type" : "Levels" } ]
},
{
"intent": "VolumeUpIntent",
"slots": []
},
{
"intent": "VolumeDownIntent",
"slots": []
},
{
"intent": "VolumeMuteIntent",
"slots": [ {"name": "DoWhat", "type": "DoWhats"}]
},
{
"intent": "ChangeInputIntent",
"slots": [ { "name" : "Input", "type": "Inputs" } ]
}
]
}
utterances:
LocateIntent Where is {User}
LocateIntent Where's {User}
LocateIntent Where {User} is
LocateIntent Where did {User} go
WhereAreWeIntent where we are
RunScriptIntent run {Script}
RunScriptIntent enter {Script}
RunScriptIntent start {Script}
RunScriptIntent engage {Script}
ActivateSceneIntent activate {Scene}
QuestionPersonIntent tell me about {Person}
QuestionPersonIntent tell me what you think about {Person}
QuestionPersonIntent what do you think of {Person}
QuestionPersonIntent describe {Person}
QuestionPersonIntent about {Person}
QuestionPersonIntent who is {Person}
SetVolumeIntent set the tv volume to {Level}
SetVolumeIntent set volume of the tv to {Level}
SetVolumeIntent set the volume to {Level}
SetVolumeIntent set volume to {Level}
SetVolumeIntent set volume {Level}
SetVolumeIntent set the volume level to {Level}
SetVolumeIntent set the volume to {Level} decibels
SetVolumeIntent volume {Level}
VolumeUpIntent turn up the tv volume
VolumeUpIntent turn the tv volume up
VolumeUpIntent turn up the volume
VolumeUpIntent turn the volume up
VolumeUpIntent volume up
VolumeDownIntent turn down the tv volume
VolumeDownIntent turn the tv volume down
VolumeDownIntent turn down the volume
VolumeDownIntent turn the volume down
VolumeDownIntent volume down
VolumeMuteIntent {DoWhat} volume
VolumeMuteIntent volume {DoWhat}
VolumeMuteIntent {DoWhat} TV
VolumeMuteIntent TV {DoWhat}
ChangeInputIntent switch to {Input}
I don’t have examples of slots… they are just lists of available sayings that to into your utterances. Example: Person slot would be a list of people by name that you expect to say.
Alexa home assistant yaml:
WhereAreWeIntent:
speech:
type: plain
text: >
{{ REDACTED }}
LocateIntent:
speech:
type: plain
text: >
{{ REDACTED }}
RunScriptIntent:
action:
service: script.turn_on
data_template:
entity_id: script.{{ Script | replace(" ", "_") }}
speech:
type: plain
text: OK
ActivateSceneIntent:
action:
service: scene.turn_on
data_template:
entity_id: scene.{{ Scene | replace(" ", "_") }}
speech:
type: plain
text: OK
QuestionPersonIntent:
speech:
type: plain
text: >
{{ REDACTED }}
SetVolumeIntent:
action:
service: media_player.volume_set
data_template:
entity_id: media_player.yamaha_receiver
volume_level: >-
{%- if Level|int in range(10,81) -%}
{%- set n = Level|float -%}
{{ (1.0-( n / 100.0 )) | round(2) }}
{%- endif -%}
speech:
type: plain
text: OK
VolumeUpIntent:
action:
service: media_player.volume_set
data_template:
entity_id: media_player.yamaha_receiver
volume_level: >
{% if is_state('media_player.yamaha_receiver', 'on') %}
{% set n = states.media_player.yamaha_receiver.attributes.volume_level | float %}
{% if n <= 0.85 %}
{{ n + 0.05 | round(2) }}
{% endif %}
{% endif %}
speech:
type: plain
text: OK
VolumeDownIntent:
action:
service: media_player.volume_set
data_template:
entity_id: media_player.yamaha_receiver
volume_level: >
{% if is_state('media_player.yamaha_receiver', 'on') %}
{% set n = states.media_player.yamaha_receiver.attributes.volume_level | float %}
{% if n >= 0.25 %}
{{ n - 0.05 | round(2) }}
{% endif %}
{% endif %}
speech:
type: plain
text: OK
VolumeMuteIntent:
action:
service: media_player.volume_mute
data_template:
entity_id: media_player.yamaha_receiver
is_volume_muted: >
{% if is_state('media_player.yamaha_receiver', 'on') %}
{% if DoWhat.lower() in ['mute'] %}
true
{% elif DoWhat.lower() in ['unmute'] %}
false
{% else %}
false
{% endif %}
{% else %}
false
{% endif %}
speech:
type: plain
text: OK
ChangeInputIntent:
action:
service: media_player.select_source
data_template:
entity_id: media_player.yamaha_receiver
source: >
{% if is_state('media_player.yamaha_receiver', 'on') %}
{% if Input.lower() in ['xbox','xbox one'] %}
Xbox One
{% elif Input.lower() in ['playstation','ps4'] %}
Playstation 4
{% elif Input.lower() in ['wii', 'wii u', 'we', 'we u', 'we you'] %}
Wii U
{% elif Input.lower() in ['computer','pc'] %}
PC
{% elif Input.lower() in ['apple tv','switch'] %}
Apple Tv
{% elif Input.lower() in ['phone','aux'] %}
Phone
{% elif Input.lower() in ['blue tooth', 'echo'] %}
Echo
{% else %}
Xbox One
{% endif %}
{% else %}
Xbox One
{% endif %}
speech:
type: plain
text: OK