43 lines
1.3 KiB
YAML
Executable File
43 lines
1.3 KiB
YAML
Executable File
###############################################################################
|
|
# @author : Jeffrey Stone
|
|
# @date : 07/09/2019
|
|
# @package : Jarvis
|
|
# @description : Bringing some Jarvis to Home Assistant
|
|
###############################################################################
|
|
|
|
input_boolean:
|
|
house_party_protocol:
|
|
name: House Party Protocol
|
|
|
|
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: Incense has been turned on.
|
|
|
|
- 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
|
|
entity_id: group.incense
|
|
- service: script.jarvis_voice
|
|
data_template:
|
|
who: '{{ states.sensor.room_audio.state }}'
|
|
message: Incense has been turned off.
|
|
|