-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathintent_script.yaml
58 lines (52 loc) · 1.53 KB
/
intent_script.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# See ALEXA_API.md for skill setup instructions.
# If these aren't working, check the cert uploaded for amazon skill at https://developer.amazon.com
# ** This is currently unused in favor of Amazon Alexa Smart Home Skill. Leaving for posterity **
##############
# AC CONTROL #
##############
ThermostatIntent:
speech:
text: Setting thermostat to {{ Temperature }} degrees
async_action: True
action:
service: climate.set_temperature
entity_id: climate.thermostat
data:
temperature: '{{ Temperature }}'
################
# GROUP TOGGLE #
################
ActivateIntent:
action:
service: homeassistant.turn_on
data:
entity_id: 'group.{{ Group | replace(" ", "_") }}'
speech:
type: plain
text: Turned on {{ Group }}
DeactivateIntent:
action:
service: homeassistant.turn_off
data:
entity_id: 'group.{{ Group | replace(" ", "_") }}'
speech:
type: plain
text: Turned off {{ Group }}
###############
# THERMOMETER #
###############
WhatisMyRoomIntent:
speech:
type: plain
text: >
{% if Thermometer == "room" %}
{% if is_state("sensor.master_bedroom_temperature", "unknown") %}
The sensor hasn't reported a value, sorry!
{% elif is_state("sensor.master_bedroom_temperature","nan") %}
The sensor hasn't reported a value, sorry!
{% else %}
Your room is {{ states.sensor.master_bedroom_temperature.state }} degrees
{% endif %}
{% else %}
I don't have a thermometer with that name
{% endif %}