56 lines
1.6 KiB
YAML
Raw Normal View History

2019-07-12 16:32:25 -04:00
###############################################################################
# @author : Jeffrey Stone
# @date : 07/09/2019
# @package : Jarvis
2019-11-09 19:16:53 -05:00
# @description : Bringing some Jarvis to Home Assistant
2019-07-12 16:32:25 -04:00
###############################################################################
2019-11-09 19:16:53 -05:00
input_boolean:
house_party_protocol:
name: House Party Protocol
2019-07-15 21:40:39 -04:00
2019-11-09 19:16:53 -05:00
automation:
- id: house_party_protocol_on
alias: Turn On House Party Protocol
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.house_party_protocol
to: 'on'
action:
- service: homeassistant.turn_on
entity_id: group.incense
- service: script.jarvis_voice
data_template:
who: '{{ states.sensor.room_audio.state }}'
message: >
<p>
{{ [
'Anchorage House has been configured for a House Party.',
'Incense has been turned on.',
'I have enabled house party protocol.'
] | random }}
</p>
2019-11-09 19:16:53 -05:00
- id: house_party_protocol_off
alias: Turn Off House Party Protocol
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.house_party_protocol
to: 'off'
action:
- service: homeassistant.turn_off
2019-11-09 19:16:53 -05:00
entity_id: group.incense
- service: script.jarvis_voice
2019-11-09 19:16:53 -05:00
data_template:
who: '{{ states.sensor.room_audio.state }}'
message: >
<p>
{{ [
'The House Party has been canceled.',
'Incense has been turned off.',
'I have disabled house party protocol.'
] | random }}
</p>