mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-07 10:18:44 +00:00
Remove media
This commit is contained in:
@@ -8,7 +8,6 @@ views:
|
|||||||
- !include lovelace/advanced_dashboard/02_lights.yaml
|
- !include lovelace/advanced_dashboard/02_lights.yaml
|
||||||
- !include lovelace/advanced_dashboard/03_climate.yaml
|
- !include lovelace/advanced_dashboard/03_climate.yaml
|
||||||
- !include lovelace/advanced_dashboard/04_sensors.yaml
|
- !include lovelace/advanced_dashboard/04_sensors.yaml
|
||||||
- !include lovelace/advanced_dashboard/07_media.yaml
|
|
||||||
- !include lovelace/advanced_dashboard/08_automations.yaml
|
- !include lovelace/advanced_dashboard/08_automations.yaml
|
||||||
- !include lovelace/advanced_dashboard/09_network.yaml
|
- !include lovelace/advanced_dashboard/09_network.yaml
|
||||||
- !include lovelace/advanced_dashboard/10_system.yaml
|
- !include lovelace/advanced_dashboard/10_system.yaml
|
||||||
|
|||||||
@@ -1,153 +0,0 @@
|
|||||||
title: Media
|
|
||||||
path: media
|
|
||||||
panel: true
|
|
||||||
icon: mdi:youtube
|
|
||||||
cards:
|
|
||||||
- type: custom:layout-card
|
|
||||||
layout_type: custom:horizontal-layout
|
|
||||||
cards:
|
|
||||||
- type: vertical-stack
|
|
||||||
cards:
|
|
||||||
- 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: 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
|
|
||||||
|
|||||||
@@ -40,10 +40,3 @@ automation:
|
|||||||
{% else %}
|
{% else %}
|
||||||
{{ states('input_number.bathroom_high_volume')|float }}
|
{{ states('input_number.bathroom_high_volume')|float }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
double_click:
|
|
||||||
- service: media_player.volume_set
|
|
||||||
entity_id: media_player.bathroom
|
|
||||||
data_template:
|
|
||||||
volume_level: "{{ states('input_number.bathroom_high_volume')|float }}"
|
|
||||||
- service: script.youtube_play_latest_pds
|
|
||||||
|
|||||||
@@ -106,8 +106,6 @@ automation:
|
|||||||
- service: automation.turn_off
|
- service: automation.turn_off
|
||||||
entity_id: automation.tv_sonos_join_tv_on_google_cast
|
entity_id: automation.tv_sonos_join_tv_on_google_cast
|
||||||
|
|
||||||
- service: script.tv_fireplace
|
|
||||||
|
|
||||||
- service: sonos.join
|
- service: sonos.join
|
||||||
entity_id:
|
entity_id:
|
||||||
- media_player.kitchen
|
- media_player.kitchen
|
||||||
|
|||||||
@@ -10,19 +10,6 @@ script:
|
|||||||
data_template:
|
data_template:
|
||||||
command: "am start -a android.intent.action.VIEW -d twitch://stream/{{ channel }}"
|
command: "am start -a android.intent.action.VIEW -d twitch://stream/{{ channel }}"
|
||||||
|
|
||||||
tv_fireplace:
|
|
||||||
icon: mdi:fireplace
|
|
||||||
alias: TV · Fireplace
|
|
||||||
sequence:
|
|
||||||
- service: script.tv_prepare_for_playback
|
|
||||||
data_template:
|
|
||||||
volume_level: "{{ volume_level | default(0.1) }}"
|
|
||||||
- service: media_extractor.play_media
|
|
||||||
entity_id: media_player.shield
|
|
||||||
data:
|
|
||||||
media_content_id: "https://www.youtube.com/watch?v=AWKzr6n0ea0"
|
|
||||||
media_content_type: video/youtube
|
|
||||||
|
|
||||||
tv_bulsatcom_toggle:
|
tv_bulsatcom_toggle:
|
||||||
icon: mdi:remote-tv
|
icon: mdi:remote-tv
|
||||||
alias: TV · Bulsatcom toggle
|
alias: TV · Bulsatcom toggle
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ group:
|
|||||||
- automation.alarm_wake_up
|
- automation.alarm_wake_up
|
||||||
- automation.lighting_living_room_toggle_ceiling_lights_on_desk_switch_single_click
|
- automation.lighting_living_room_toggle_ceiling_lights_on_desk_switch_single_click
|
||||||
- automation.lighting_living_room_toggle_ambient_lights_on_desk_switch_double_click
|
- automation.lighting_living_room_toggle_ambient_lights_on_desk_switch_double_click
|
||||||
- automation.youtube_play_latest_pds_on_bathroom_switch_dobule_click
|
|
||||||
- automation.media_sonos_volume_up_on_bathroom_switch_click
|
- automation.media_sonos_volume_up_on_bathroom_switch_click
|
||||||
- automation.music_living_room_play_pause_on_desk_switch_hold
|
- automation.music_living_room_play_pause_on_desk_switch_hold
|
||||||
- automation.music_master_bedroom_play_pause_on_switch_hold
|
- automation.music_master_bedroom_play_pause_on_switch_hold
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ alexa:
|
|||||||
- sensor.purifier_air_quality
|
- sensor.purifier_air_quality
|
||||||
|
|
||||||
- script.routine_bedtime
|
- script.routine_bedtime
|
||||||
- script.tv_fireplace
|
|
||||||
- script.sonos_join_bedroom
|
- script.sonos_join_bedroom
|
||||||
- script.sonos_join_tv
|
- script.sonos_join_tv
|
||||||
- script.routine_good_night
|
- script.routine_good_night
|
||||||
@@ -75,8 +74,6 @@ alexa:
|
|||||||
name: "Bedroom air quality"
|
name: "Bedroom air quality"
|
||||||
script.routine_bedtime:
|
script.routine_bedtime:
|
||||||
name: "Bedtime"
|
name: "Bedtime"
|
||||||
script.tv_fireplace:
|
|
||||||
name: "Fireplace"
|
|
||||||
script.sonos_join_bedroom:
|
script.sonos_join_bedroom:
|
||||||
name: "Sonos Bedroom"
|
name: "Sonos Bedroom"
|
||||||
script.sonos_join_tv:
|
script.sonos_join_tv:
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
# sensor:
|
|
||||||
# - platform: twitch
|
|
||||||
# client_id: !secret twitch_client_id
|
|
||||||
# channels:
|
|
||||||
# - LIRIK
|
|
||||||
# - day9tv
|
|
||||||
# - cohhcarnage
|
|
||||||
# - sacriel
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
sensor:
|
|
||||||
- platform: youtube
|
|
||||||
channel_id: UClFSU9_bUb4Rc6OYfTt5SPw
|
|
||||||
- platform: folder
|
|
||||||
folder: /config/www/audio/youtube/pds
|
|
||||||
- platform: folder
|
|
||||||
folder: /config/www/audio/youtube
|
|
||||||
|
|
||||||
input_text:
|
|
||||||
youtube_download_url:
|
|
||||||
name: Youtube download URL
|
|
||||||
icon: mdi:link
|
|
||||||
initial: ""
|
|
||||||
youtube_download_name:
|
|
||||||
name: Youtube download name
|
|
||||||
icon: mdi:format-letter-case
|
|
||||||
initial: ""
|
|
||||||
|
|
||||||
shell_command:
|
|
||||||
youtube_download: python3.7 /config/custom_scripts/youtube_download.py {{ url }} {{ name }} {{ folder }}
|
|
||||||
|
|
||||||
script:
|
|
||||||
youtube_play_file:
|
|
||||||
alias: Youtube · Play file
|
|
||||||
sequence:
|
|
||||||
- service: script.sonos_join_bedroom
|
|
||||||
- service: media_player.play_media
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
data_template:
|
|
||||||
media_content_id: >
|
|
||||||
{{ states('sensor.sarah_url') }}/local{{ file.split('/config/www') | last }}
|
|
||||||
media_content_type: "music"
|
|
||||||
|
|
||||||
youtube_play_latest_pds:
|
|
||||||
alias: Youtube · Play latest PDS
|
|
||||||
sequence:
|
|
||||||
- service: script.youtube_play_file
|
|
||||||
data_template:
|
|
||||||
file: "{{ state_attr('sensor.pds', 'file_list') | sort | last }}"
|
|
||||||
|
|
||||||
|
|
||||||
youtube_download_selected:
|
|
||||||
alias: Youtube · Download selected video
|
|
||||||
sequence:
|
|
||||||
- service: shell_command.youtube_download
|
|
||||||
data_template:
|
|
||||||
url: "{{ states('input_text.youtube_download_url') }}"
|
|
||||||
name: "{{ states('input_text.youtube_download_name') }}"
|
|
||||||
- service: input_text.set_value
|
|
||||||
entity_id:
|
|
||||||
- input_text.youtube_download_url
|
|
||||||
- input_text.youtube_download_name
|
|
||||||
data:
|
|
||||||
value: ""
|
|
||||||
|
|
||||||
youtube_download_and_play:
|
|
||||||
alias: Youtube · Download and play selected video
|
|
||||||
sequence:
|
|
||||||
- service: shell_command.youtube_download
|
|
||||||
data_template:
|
|
||||||
url: "{{ states('input_text.youtube_download_url') }}"
|
|
||||||
name: "{{ states('input_text.youtube_download_name') }}"
|
|
||||||
|
|
||||||
- service: script.sonos_join_bedroom
|
|
||||||
- service: media_player.play_media
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
data_template:
|
|
||||||
media_content_id: >-
|
|
||||||
{% set name = states('input_text.youtube_download_name') %}
|
|
||||||
{{ states('sensor.sarah_url') }}/local/audio/youtube/{{ name }}.mp3
|
|
||||||
media_content_type: "music"
|
|
||||||
|
|
||||||
- service: input_text.set_value
|
|
||||||
entity_id:
|
|
||||||
- input_text.youtube_download_url
|
|
||||||
- input_text.youtube_download_name
|
|
||||||
data:
|
|
||||||
value: ""
|
|
||||||
|
|
||||||
automation:
|
|
||||||
- alias: Youtube · Download latest PDS
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: sensor.philip_defranco
|
|
||||||
action:
|
|
||||||
- service: shell_command.youtube_download
|
|
||||||
data_template:
|
|
||||||
url: "{{ state_attr('sensor.philip_defranco', 'url') }}"
|
|
||||||
name: "{{ state_attr('sensor.philip_defranco', 'published')[0:10] }}"
|
|
||||||
folder: "pds/"
|
|
||||||
- service: script.say
|
|
||||||
data:
|
|
||||||
message: "Just wanted to let you know - a new PDS is available!"
|
|
||||||
Reference in New Issue
Block a user