From baea9be57fbcc4912016ecb7553b39a9062d6e50 Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Sun, 19 Apr 2020 14:31:17 +0300 Subject: [PATCH] Refactor media dashboard --- config/lovelace/home_dashboard/07_media.yaml | 282 ++++++++++--------- 1 file changed, 146 insertions(+), 136 deletions(-) diff --git a/config/lovelace/home_dashboard/07_media.yaml b/config/lovelace/home_dashboard/07_media.yaml index 5cb79bf..14aed09 100644 --- a/config/lovelace/home_dashboard/07_media.yaml +++ b/config/lovelace/home_dashboard/07_media.yaml @@ -1,144 +1,154 @@ title: Media path: media -panel: false +panel: true icon: mdi:youtube badges: [] cards: - - type: vertical-stack + - type: custom:layout-card + layout: horizontal cards: - - type: custom:button-card - template: small - entity: script.tv_fireplace - name: Fireplace - - type: custom:config-template-card - entities: - - sensor.day9tv - - sensor.lirik - - sensor.cohhcarnage - - sensor.sacriel - card: - type: vertical-stack - title: Twitch - cards: - - type: horizontal-stack - cards: - - type: picture-entity - entity: sensor.day9tv - image: ${states['sensor.day9tv'].attributes.entity_picture} - state_filter: - "online": brightness(110%) - "offline": brightness(50%) saturate(0) - tap_action: - action: call-service - service: script.tv_twitch - service_data: - channel: day9tv - - type: picture-entity - entity: sensor.lirik - image: ${states['sensor.lirik'].attributes.entity_picture} - state_filter: - "online": brightness(110%) - "offline": brightness(50%) saturate(0) - tap_action: - action: call-service - service: script.tv_twitch - service_data: - channel: lirik - - type: horizontal-stack - cards: - - type: picture-entity - entity: sensor.cohhcarnage - image: ${states['sensor.cohhcarnage'].attributes.entity_picture} - state_filter: - "online": brightness(110%) - "offline": brightness(50%) saturate(0) - tap_action: - action: call-service - service: script.tv_twitch - service_data: - channel: cohhcarnage - - type: picture-entity - entity: sensor.sacriel - image: ${states['sensor.sacriel'].attributes.entity_picture} - state_filter: - "online": brightness(110%) - "offline": brightness(50%) saturate(0) - tap_action: - action: call-service - service: script.tv_twitch - service_data: - channel: sacriel - - - type: vertical-stack - cards: - - type: entities - style: | - ha-icon { - color: red; - } - title: Youtube controls - icon: mdi:youtube - show_header_toggle: false - entities: - - entity: input_text.youtube_download_url - type: "custom:text-input-row" - - entity: input_text.youtube_download_name - type: "custom:text-input-row" - - - type: horizontal-stack + - type: vertical-stack cards: - - type: entity-button - entity: script.youtube_download_selected - name: Download - icon: mdi:download - icon_height: 48px - tap_action: - action: call-service - service: script.youtube_download_selected - - type: entity-button - entity: script.youtube_download_and_play - name: Download & Play - icon: mdi:youtube-tv - icon_height: 48px - tap_action: - action: call-service - service: script.youtube_download_and_play - - type: custom:folder-card - style: | - .card-header ha-icon { - color: red; - } - entity: sensor.youtube - title: Available Youtube - icon: "mdi:youtube" - tap_action: - action: call-service - service: script.youtube_play_file + - type: custom:config-template-card + entities: + - sensor.day9tv + - sensor.lirik + - sensor.cohhcarnage + - sensor.sacriel + card: + type: vertical-stack + title: Twitch + icon: mdi:twitch + cards: + - type: horizontal-stack + cards: + - type: picture-entity + entity: sensor.day9tv + image: ${states['sensor.day9tv'].attributes.entity_picture} + state_filter: + "online": brightness(110%) + "offline": brightness(50%) saturate(0) + tap_action: + action: call-service + service: script.tv_twitch + service_data: + channel: day9tv + - type: picture-entity + entity: sensor.lirik + image: ${states['sensor.lirik'].attributes.entity_picture} + state_filter: + "online": brightness(110%) + "offline": brightness(50%) saturate(0) + tap_action: + action: call-service + service: script.tv_twitch + service_data: + channel: lirik + - type: horizontal-stack + cards: + - type: picture-entity + entity: sensor.cohhcarnage + image: ${states['sensor.cohhcarnage'].attributes.entity_picture} + state_filter: + "online": brightness(110%) + "offline": brightness(50%) saturate(0) + tap_action: + action: call-service + service: script.tv_twitch + service_data: + channel: cohhcarnage + - type: picture-entity + entity: sensor.sacriel + image: ${states['sensor.sacriel'].attributes.entity_picture} + state_filter: + "online": brightness(110%) + "offline": brightness(50%) saturate(0) + tap_action: + action: call-service + service: script.tv_twitch + service_data: + channel: sacriel - - type: custom:config-template-card - entities: - - sensor.philip_defranco - - sensor.pds - card: - type: vertical-stack - cards: - - type: picture-entity - entity: sensor.philip_defranco - image: "${states['sensor.philip_defranco'].attributes.entity_picture}" - name: "Play the latest PDS" - show_state: false - tap_action: - action: call-service - service: script.youtube_play_latest_pds - - type: markdown - content: "${states['sensor.philip_defranco'].state}" - - type: custom:folder-card - entity: sensor.pds - title: Available PDS - icon: "mdi:youtube" - sort: "descending" - max_count: 10 - show_count: true - tap_action: - action: call-service - service: script.youtube_play_file + - type: vertical-stack + title: Youtube + cards: + - type: custom:config-template-card + entities: + - sensor.philip_defranco + - sensor.pds + card: + type: vertical-stack + cards: + - type: picture-entity + entity: sensor.philip_defranco + image: "${states['sensor.philip_defranco'].attributes.entity_picture}" + name: "Play the latest PDS" + show_state: false + tap_action: + action: call-service + service: script.youtube_play_latest_pds + - type: markdown + content: "${states['sensor.philip_defranco'].state}" + + - type: vertical-stack + cards: + - type: entities + title: Download audio + icon: mdi:youtube + show_header_toggle: false + entities: + - entity: input_text.youtube_download_url + type: "custom:text-input-row" + - entity: input_text.youtube_download_name + type: "custom:text-input-row" + - type: custom:hui-horizontal-stack-card + cards: + - type: custom:button-card + name: Download + icon: mdi:download + size: 48px + style: | + ha-card { + box-shadow: none; + } + tap_action: + action: call-service + service: script.youtube_download_selected + - type: custom:button-card + name: Download & Play + icon: mdi:youtube-tv + size: 48px + style: | + ha-card { + box-shadow: none; + } + tap_action: + action: call-service + service: script.youtube_download_and_play + + - type: custom:folder-card + entity: sensor.pds + title: Philip DeFranco Show + icon: "mdi:youtube" + sort: "descending" + max_count: 10 + show_count: true + tap_action: + action: call-service + service: script.youtube_play_file + + - type: custom:folder-card + entity: sensor.youtube + title: Downloaded audio files + icon: "mdi:youtube" + tap_action: + action: call-service + service: script.youtube_play_file + + - type: vertical-stack + title: Scenes + cards: + - type: custom:button-card + entity: script.tv_fireplace + name: Fireplace + size: 48px