Turn onthe AMPs if music starts streaming! and then off.

This commit is contained in:
CCOSTAN
2016-12-27 19:36:09 +00:00
parent 11ca15ba73
commit fec6c0e51d
2 changed files with 39 additions and 23 deletions

View File

@@ -1,23 +1,38 @@
###################################
## Turn on/off Living Room AMPs via ALexa/IFTTT event.
###################################
- alias: 'IFTTT Turn AMP on'
trigger:
- platform: event
event_type: amp_on
action:
- service: switch.turn_on
entity_id: switch.living_room_amp
- alias: 'IFTTT Turn AMP off'
trigger:
- platform: event
event_type: amp_off
action:
- service: switch.turn_off
entity_id: switch.living_room_amp
###################################
## Turn on/off Living Room AMPs via ALexa/IFTTT event.
###################################
- alias: 'IFTTT Turn AMP on'
trigger:
- platform: event
event_type: amp_on
- platform: state
entity_id: media_player.whole_house
from: 'off'
to: 'playing'
- platform: state
entity_id: media_player.livingroomcc
from: 'off'
to: 'playing'
action:
- service: switch.turn_on
entity_id: switch.living_room_amp
- alias: 'IFTTT Turn AMP off'
trigger:
- platform: event
event_type: amp_off
- platform: state
entity_id: media_player.whole_house
from: 'playing'
to: 'off'
- platform: state
entity_id: media_player.livingroomcc
from: 'playing'
to: 'off'
action:
- service: switch.turn_off
entity_id: switch.living_room_amp