Update Theater State Machine
This commit is contained in:
@@ -56,13 +56,7 @@ script:
|
||||
data:
|
||||
option: Paused
|
||||
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ is_state('media_player.living_room_roku', 'on') }}"
|
||||
- condition: template
|
||||
value_template: "{{ not is_state('input_select.ht_player_state', 'Idle') }}"
|
||||
- conditions: "{{ is_state('media_player.living_room_roku', 'on') }}"
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
@@ -70,7 +64,13 @@ script:
|
||||
data:
|
||||
option: Stopped
|
||||
|
||||
- conditions: "{{ is_state('media_player.living_room_roku', 'off') }}"
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ is_state('media_player.living_room_roku', 'idle') }}"
|
||||
- condition: template
|
||||
value_template: "{{ is_state('media_player.living_room_roku', 'off') }}"
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
@@ -103,11 +103,13 @@ automation:
|
||||
data:
|
||||
option: Idle
|
||||
|
||||
- alias: Home Theater Receiver Turn-On/Off
|
||||
- alias: Home Theater Receiver State Update
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
- platform: state
|
||||
entity_id: media_player.living_room_receiver
|
||||
- platform: state
|
||||
entity_id: media_player.living_room_roku
|
||||
action:
|
||||
- service: script.ht_player_state_update
|
||||
|
||||
Reference in New Issue
Block a user