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