From 2bfa07019e3bc777b6200120f73b0526c43344a1 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 20 Nov 2022 16:11:00 +0100 Subject: [PATCH] saving work from the last months --- lovelace/dashboard/harmony/harmony.yaml | 94 ++++++++++--------- .../dashboard/harmony/volume_control.yaml | 78 +++++++++++---- packages/harmony/harmony.yaml | 35 ++++++- packages/harmony/netflix.yaml | 4 +- packages/harmony/turn_on_tv.yaml | 2 +- packages/harmony/volume_control.yaml | 14 +++ packages/light/buttons/automation.yaml | 3 +- packages/light/motion.yaml | 7 -- packages/living_room_remote/remote.yaml | 68 ++++++++++++++ packages/mailbox/mailbox_received.yaml | 3 +- packages/pc/pc.yaml | 5 - ...verything.yaml => turn_off_everything.txt} | 0 12 files changed, 231 insertions(+), 82 deletions(-) create mode 100755 packages/living_room_remote/remote.yaml rename packages/{turn_off_everything.yaml => turn_off_everything.txt} (100%) diff --git a/lovelace/dashboard/harmony/harmony.yaml b/lovelace/dashboard/harmony/harmony.yaml index 1712b38..b24b193 100755 --- a/lovelace/dashboard/harmony/harmony.yaml +++ b/lovelace/dashboard/harmony/harmony.yaml @@ -5,19 +5,19 @@ - type: vertical-stack cards: + - type: 'custom:button-card' + color_type: icon + color: rgb(229,9,20) + icon: "mdi:netflix" + size: 10% + tap_action: + action: call-service + service: script.turn_on + service_data: + entity_id: script.netflix_and_chill + name: Netflix - type: horizontal-stack cards: - - type: 'custom:button-card' - color_type: icon - color: rgb(229,9,20) - icon: "mdi:netflix" - size: 20% - tap_action: - action: call-service - service: script.turn_on - service_data: - entity_id: script.netflix_and_chill - name: Netflix - type: 'custom:button-card' color_type: icon color: rgb(30,215,96) @@ -29,11 +29,26 @@ service_data: entity_id: script.denon_listen_music name: Spotify - + - type: 'custom:button-card' + color_type: icon + color: rgb(51, 102, 255) + icon: "mdi:disc-player" + size: 20% + #tap_action: + # action: call-service + # service: script.turn_on + # service_data: + # entity_id: script.denon_listen_music + name: Blueray +- type: 'custom:button-card' + template: card_title + name: Game + label: Control + - type: vertical-stack cards: - type: horizontal-stack - cards: + cards: - type: 'custom:button-card' color_type: icon #color: rgb(229,9,20) @@ -47,31 +62,22 @@ name: Nintendo Switch - type: 'custom:button-card' color_type: icon - color: rgb(51, 102, 255) - icon: "mdi:disc-player" + color: rgb(0,173,238) + icon: "mdi:steam" size: 20% - #tap_action: - # action: call-service - # service: script.turn_on - # service_data: - # entity_id: script.denon_listen_music - name: Blueray + tap_action: + action: call-service + service: script.turn_on + service_data: + entity_id: script.denon_play_steam + name: Steam Link + + - type: vertical-stack cards: - type: horizontal-stack cards: - - type: 'custom:button-card' - color_type: icon - color: rgb(0,173,238) - icon: "mdi:steam" - size: 20% - # tap_action: - # action: call-service - # service: script.turn_on - # service_data: - # entity_id: script.netflix_and_chill - name: Steam Link - type: 'custom:button-card' color_type: icon color: rgb(144,138,153) @@ -83,15 +89,15 @@ # service_data: # entity_id: script.denon_listen_music name: Super NT - - - type: 'custom:button-card' - color_type: icon - color: rgb(41, 61, 61) - icon: "mdi:television-off" - size: 10% - tap_action: - action: call-service - service: script.turn_on - service_data: - entity_id: script.denon_tv_turn_off - name: Turn Off \ No newline at end of file + - type: 'custom:button-card' + color_type: icon + #color: rgb(229,9,20) + icon: "mdi:gamepad-circle" + size: 20% + tap_action: + action: call-service + service: script.turn_on + service_data: + entity_id: script.denon_play_switch + name: Game + \ No newline at end of file diff --git a/lovelace/dashboard/harmony/volume_control.yaml b/lovelace/dashboard/harmony/volume_control.yaml index 470e0a5..7649aed 100755 --- a/lovelace/dashboard/harmony/volume_control.yaml +++ b/lovelace/dashboard/harmony/volume_control.yaml @@ -1,33 +1,22 @@ - type: 'custom:button-card' template: card_title - name: Volume - label: Control + name: Volume Control + label: Denon - type: horizontal-stack cards: - type: 'custom:button-card' icon: "mdi:volume-minus" - size: 20% + size: 15% tap_action: action: call-service service: script.turn_on service_data: entity_id: script.denon_volume_down - name: Down by 5 - - type: 'custom:button-card' - color_type: icon - color: rgb(255,0,0) - icon: "mdi:volume-mute" - size: 20% - tap_action: - action: call-service - service: script.turn_on - service_data: - entity_id: script.denon_volume_mute - name: Mute + name: Down by 5 - type: 'custom:button-card' icon: "mdi:volume-plus" - size: 20% + size: 15% tap_action: action: call-service service: script.turn_on @@ -35,8 +24,30 @@ entity_id: script.denon_volume_up name: Up by 5 +- type: horizontal-stack + cards: + - type: 'custom:button-card' + icon: "mdi:volume-minus" + size: 15% + tap_action: + action: call-service + service: script.turn_on + service_data: + entity_id: script.denon_volume_down_1 + name: Down by 1 + - type: 'custom:button-card' + icon: "mdi:volume-plus" + size: 15% + tap_action: + action: call-service + service: script.turn_on + service_data: + entity_id: script.denon_volume_up_1 + name: Up by 1 + - type: 'custom:button-card' template: card_title + name: Denon Volume label: Presets - type: horizontal-stack @@ -50,14 +61,43 @@ service: script.turn_on service_data: entity_id: script.denon_volume_video - name: TV Volume + name: Streaming Volume - type: 'custom:button-card' color_type: icon - icon: "mdi:bookmark-music-outline" + icon: "mdi:music-circle-outline" size: 15% tap_action: action: call-service service: script.turn_on service_data: entity_id: script.denon_volume_music - name: Music Volume \ No newline at end of file + name: Music Volume + +- type: 'custom:button-card' + template: card_title + name: Mute and Turn off + +- type: horizontal-stack + cards: + - type: 'custom:button-card' + color_type: icon + color: rgb(255,0,0) + icon: "mdi:volume-mute" + size: 20% + tap_action: + action: call-service + service: script.turn_on + service_data: + entity_id: script.denon_volume_mute + name: Mute + - type: 'custom:button-card' + color_type: icon + color: rgb(41, 61, 61) + icon: "mdi:television-off" + size: 20% + tap_action: + action: call-service + service: script.turn_on + service_data: + entity_id: script.denon_tv_turn_off + name: Turn Off \ No newline at end of file diff --git a/packages/harmony/harmony.yaml b/packages/harmony/harmony.yaml index 96889ed..b85013b 100755 --- a/packages/harmony/harmony.yaml +++ b/packages/harmony/harmony.yaml @@ -3,17 +3,21 @@ script: sequence: - service: media_player.turn_on target: - device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6 + device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6 + - delay: + seconds: 30 - service: media_player.select_source data: source: HEOS Music target: entity_id: media_player.denon_avr_x1600h + - delay: + seconds: 2 - service: media_player.volume_set data: volume_level: 0.3 target: - device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6 + entity_id: media_player.denon_avr_x1600h - service: remote.send_command target: device_id: 13079d62ad53d8991b26238c5594adca @@ -42,7 +46,32 @@ script: data: device: "78200006" command: InputHdmi1 - + + denon_play_steam: + sequence: + - service: script.turn_on + target: + entity_id: script.tv_turn_on + - service: remote.send_command + target: + device_id: media_player.denon_avr_x1600h + data: + device: "78200006" + command: InputHdmi2 + - service: media_player.turn_on + target: + device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6 + - delay: + seconds: 5 + - service: media_player.select_source + data: + source: Steam Link + target: + entity_id: media_player.denon_avr_x1600h + - service: media_player.volume_set + data: + volume_level: 0.45 + denon_tv_turn_off: sequence: - service: media_player.turn_off diff --git a/packages/harmony/netflix.yaml b/packages/harmony/netflix.yaml index 82e2f2a..abf3a45 100755 --- a/packages/harmony/netflix.yaml +++ b/packages/harmony/netflix.yaml @@ -37,8 +37,10 @@ script: source: Fire TV Stick target: entity_id: media_player.denon_avr_x1600h + - delay: + seconds: 2 - service: media_player.volume_set data: volume_level: 0.5 target: - device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6 \ No newline at end of file + entity_id: media_player.denon_avr_x1600h \ No newline at end of file diff --git a/packages/harmony/turn_on_tv.yaml b/packages/harmony/turn_on_tv.yaml index 3d1cd3a..d6e1f65 100755 --- a/packages/harmony/turn_on_tv.yaml +++ b/packages/harmony/turn_on_tv.yaml @@ -5,7 +5,7 @@ script: target: entity_id: light.livingroom_switch_tv - delay: - seconds: 5 + seconds: 15 - service: remote.send_command target: device_id: 13079d62ad53d8991b26238c5594adca diff --git a/packages/harmony/volume_control.yaml b/packages/harmony/volume_control.yaml index 7cdbd41..f6aaebe 100755 --- a/packages/harmony/volume_control.yaml +++ b/packages/harmony/volume_control.yaml @@ -13,6 +13,20 @@ script: data_template: volume_level: "{{ state_attr('media_player.denon_avr_x1600h', 'volume_level') | float - 0.05 }}" + denon_volume_up_1: + sequence: + - service: media_player.volume_set + entity_id: media_player.denon_avr_x1600h + data_template: + volume_level: "{{ state_attr('media_player.denon_avr_x1600h', 'volume_level') | float + 0.01 }}" + + denon_volume_down_1: + sequence: + - service: media_player.volume_set + entity_id: media_player.denon_avr_x1600h + data_template: + volume_level: "{{ state_attr('media_player.denon_avr_x1600h', 'volume_level') | float - 0.01 }}" + denon_volume_video: sequence: - service: media_player.volume_set diff --git a/packages/light/buttons/automation.yaml b/packages/light/buttons/automation.yaml index 21560d4..4aa3cd1 100755 --- a/packages/light/buttons/automation.yaml +++ b/packages/light/buttons/automation.yaml @@ -53,4 +53,5 @@ automation: entity_id: light.office_bulb data: color_temp: 255 - brightness: 255 \ No newline at end of file + brightness: 255 + diff --git a/packages/light/motion.yaml b/packages/light/motion.yaml index 3111c59..aca707e 100755 --- a/packages/light/motion.yaml +++ b/packages/light/motion.yaml @@ -26,13 +26,6 @@ automation: domain: binary_sensor platform: device type: no_motion - condition: - condition: or - conditions: - - condition: sun - before: sunrise - - condition: sun - after: sunset action: - type: turn_off device_id: a1865e6541efc7167ba2b21c6e005147 diff --git a/packages/living_room_remote/remote.yaml b/packages/living_room_remote/remote.yaml new file mode 100755 index 0000000..c07015a --- /dev/null +++ b/packages/living_room_remote/remote.yaml @@ -0,0 +1,68 @@ +automation: + # Living Room button turn light on + - alias: living_room_light_button_turn_on + trigger: + - device_id: 86384e5da7e890f4a7a84d186383d1c1 + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_on + action: + - service: light.turn_on + target: + entity_id: light.living_room_lights + + # Living Room button turn light off + - alias: living_room_light_button_turn_off + trigger: + - device_id: 86384e5da7e890f4a7a84d186383d1c1 + domain: zha + platform: device + type: remote_button_short_press + subtype: turn_off + action: + - service: light.turn_off + target: + entity_id: light.living_room_lights + + # Living Room button Netflix + - alias: living_room_light_button_tv + trigger: + - device_id: 86384e5da7e890f4a7a84d186383d1c1 + domain: zha + platform: device + type: remote_button_short_press + subtype: left + action: + - service: script.turn_on + target: + entity_id: script.netflix_and_chill + + # Living Room button Spotify + - alias: living_room_light_button_music + trigger: + - device_id: 86384e5da7e890f4a7a84d186383d1c1 + domain: zha + platform: device + type: remote_button_short_press + subtype: right + action: + - service: script.turn_on + target: + entity_id: script.denon_listen_music + + # Living Room button Spotify + - alias: living_room_turn_off_everything + trigger: + - device_id: 86384e5da7e890f4a7a84d186383d1c1 + domain: zha + platform: device + type: remote_button_long_release + subtype: dim_down + action: + - service: script.turn_on + target: + entity_id: script.denon_tv_turn_off + - service: light.turn_off + target: + entity_id: light.living_room_lights \ No newline at end of file diff --git a/packages/mailbox/mailbox_received.yaml b/packages/mailbox/mailbox_received.yaml index 836459c..d739732 100755 --- a/packages/mailbox/mailbox_received.yaml +++ b/packages/mailbox/mailbox_received.yaml @@ -1,5 +1,6 @@ automation: - - alias: mailbox_mail_received + - id: mailbox_mail_received + alias: mailbox_mail_received mode: single trigger: - device_id: ca819ab69f4c9e16861daf8ffacdd10e diff --git a/packages/pc/pc.yaml b/packages/pc/pc.yaml index c4c12bb..988cc24 100755 --- a/packages/pc/pc.yaml +++ b/packages/pc/pc.yaml @@ -19,8 +19,3 @@ automation: device_id: 343b205f3ed48a715e59c5490050150f entity_id: light.office_switch_socket domain: light - - delay: - seconds: 15 - - service: switch.turn_on - target: - entity_id: switch.tower diff --git a/packages/turn_off_everything.yaml b/packages/turn_off_everything.txt similarity index 100% rename from packages/turn_off_everything.yaml rename to packages/turn_off_everything.txt