92 lines
2.7 KiB
YAML
92 lines
2.7 KiB
YAML
---
|
|
- alias: "[Media] Projector mode"
|
|
id: media_switching_to_projector_mode
|
|
initial_state: "true"
|
|
trigger:
|
|
- platform: state
|
|
entity_id: select.living_room_harmony_hub_activities
|
|
to: "ShTV+AVR+Prj"
|
|
action:
|
|
- service: cover.open_cover
|
|
data:
|
|
entity_id: cover.motor_01
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: media_player.onkyo_receiver
|
|
state: "off"
|
|
sequence:
|
|
- service: media_player.turn_on
|
|
entity_id: media_player.onkyo_receiver
|
|
- delay: "00:00:05"
|
|
- service: media_player.onkyo_select_hdmi_output
|
|
data:
|
|
entity_id: media_player.onkyo_receiver
|
|
hdmi_output: out-sub
|
|
- delay: "00:00:01"
|
|
- service: button.press
|
|
target:
|
|
entity_id:
|
|
- button.esp8266_hdmi_cec_01_turn_active_source
|
|
# - button.esp8266_hdmi_cec_01_turn_everything_off
|
|
# - service: remote.send_command
|
|
# target:
|
|
# entity_id: remote.broadlink_rm4_mini
|
|
# data:
|
|
# device: projector_lg_hu810pw
|
|
# command:
|
|
# - "Power Off"
|
|
# - "b64:JgBYAAABII8TERMSEjcTERMRExISEhISEjYTNxISEjYTNhI2EjcTNhISEhITERM1ExITEhISExETNhI2EjcTERM2EjYTNhI3EgAFAAABIUgSAAwTAAEhRxMADQU="
|
|
- service: notify.telegram_alex
|
|
data:
|
|
message: "Switching to media system to the Projector mode"
|
|
|
|
- alias: "[Media] TV mode"
|
|
id: media_switching_to_tv_mode
|
|
initial_state: "true"
|
|
trigger:
|
|
- platform: state
|
|
entity_id: select.living_room_harmony_hub_activities
|
|
to: "ShTV+AVR+TV"
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: cover.motor_01
|
|
state: "open"
|
|
sequence:
|
|
- service: cover.close_cover
|
|
data:
|
|
entity_id: cover.motor_01
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: media_player.onkyo_receiver
|
|
state: "off"
|
|
sequence:
|
|
- service: media_player.turn_on
|
|
entity_id: media_player.onkyo_receiver
|
|
- delay: '00:00:05'
|
|
- service: media_player.onkyo_select_hdmi_output
|
|
data:
|
|
entity_id: media_player.onkyo_receiver
|
|
hdmi_output: out
|
|
- service: notify.telegram_alex
|
|
data:
|
|
message: "Switching to media system to the TV mode"
|
|
|
|
- alias: "[Media] Off mode"
|
|
id: media_switching_off
|
|
initial_state: "true"
|
|
trigger:
|
|
- platform: state
|
|
entity_id: select.living_room_harmony_hub_activities
|
|
to: "power_off"
|
|
action:
|
|
- service: cover.close_cover
|
|
data:
|
|
entity_id: cover.motor_01
|
|
- service: notify.telegram_alex
|
|
data:
|
|
message: "Switching off media system"
|