Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #groups.yaml
- media:
- name: Media
- view: true
- entities:
- - group.music
- - group.speakers
- - group.displays
- music:
- name: Music
- control: hidden
- entities:
- - input_select.speakers
- - input_select.music_station
- - script.music_start
- - script.music_stop
- - script.music_all_stop
- - input_number.volume
- - input_number.volume_office
- - input_number.volume_kitchen
- - input_number.volume_dining
- - input_number.volume_living
- - input_number.volume_soundbar
- - input_number.volume_bedroom
- - input_number.volume_bathroom
- speakers:
- name: Speakers
- entities:
- - media_player.house
- - media_player.bathroom_speaker
- - media_player.bedroom_speaker
- - media_player.dining_room_speaker
- - media_player.kitchen_speaker
- - media_player.living_room_speaker
- - media_player.soundbar_speaker
- displays:
- name: Displays
- entities:
- - media_player.livingroom_tv
- - media_player.bedroom_tv
- - media_player.kitchen_display
- - media_player.office_display
- #scripts.yaml
- music_stop:
- alias: Stop streaming music
- sequence:
- - service: media_player.media_stop
- data_template:
- entity_id: >
- {% if is_state("input_select.speakers", "House") %} media_player.house
- {% elif is_state("input_select.speakers", "Office") %} media_player.office_display
- {% elif is_state("input_select.speakers", "Kitchen") %} media_player.kitchen_speaker
- {% elif is_state("input_select.speakers", "Dinning Room") %} media_player.dinning_room_speaker
- {% elif is_state("input_select.speakers", "Living Room") %} media_player.living_room_speaker
- {% elif is_state("input_select.speakers", "Roaming") %} media_player.soundbar_speaker
- {% elif is_state("input_select.speakers", "Bedroom") %} media_player.bedroom_speaker
- {% elif is_state("input_select.speakers", "Bathroom") %} media_player.bathroom_speaker
- {% endif %}
- - service: input_select.select_option
- data:
- entity_id: input_select.music_station
- option: Stopped
- music_all_stop:
- alias: Stop all streaming music
- sequence:
- - service: media_player.media_stop
- entity_id: media_player.house
- - service: media_player.media_stop
- entity_id: media_player.office_display
- - service: media_player.media_stop
- entity_id: media_player.kitchen_speaker
- - service: media_player.media_stop
- entity_id: media_player.dinning_room_speaker
- - service: media_player.media_stop
- entity_id: media_player.living_room_speaker
- - service: media_player.media_stop
- entity_id: media_player.soundbar_speaker
- - service: media_player.media_stop
- entity_id: media_player.bedroom_speaker
- - service: media_player.media_stop
- entity_id: media_player.bathroom_speaker
- music_start:
- alias: Start streaming music
- sequence:
- - service: automation.trigger
- entity_id: automation.play_music_on_chromecast
- #input_number.yaml
- # Input Number Statements
- volume:
- name: Master
- icon: mdi:volume-high
- min: 0
- max: 1
- step: 0.05
- volume_office:
- name: Office
- icon: mdi:volume-high
- min: 0
- max: 1
- step: 0.05
- volume_kitchen:
- name: Kitchen
- icon: mdi:volume-high
- min: 0
- max: 1
- step: 0.05
- volume_dining:
- name: Dining
- icon: mdi:volume-high
- min: 0
- max: 1
- step: 0.05
- volume_living:
- name: Living
- icon: mdi:volume-high
- min: 0
- max: 1
- step: 0.05
- volume_soundbar:
- name: Soundbar
- icon: mdi:volume-high
- min: 0
- max: 1
- step: 0.05
- volume_bedroom:
- name: Bedroom
- icon: mdi:volume-high
- min: 0
- max: 1
- step: 0.05
- volume_bathroom:
- name: Bathroom
- icon: mdi:volume-high
- min: 0
- max: 1
- step: 0.05
- #input_select.yaml
- # Input Select Statements
- music_station:
- name: Source
- icon: mdi:music
- initial: Stopped
- options:
- - Stopped
- - Vanilla Deep
- - Vanilla Smooth
- - Vanilla Greek
- - Arion
- - Athens Party
- - MAD Radio
- - Diesi
- - Derti
- - Dromos FM
- - Sok FM
- - Sfera
- - Jams 104.3
- - B96
- - Greek Summer 2018 vol2
- - Greek Summer 2018
- - Παλιά Ελληνικά
- - Αξέχαστα Ελληνικά Λαϊκά
- - Αθάνατα Λαϊκά
- - Τα Χρυσά Λαϊκά
- - Summer 2018 vol2
- - Summer 2018
- - Winter 2017
- - Fall 2017
- - Spring 2018
- speakers:
- name: Speakers
- icon: mdi:speaker-wireless
- options:
- - House
- - Kitchen
- - Dining Room
- - Living Room
- - Soundbar
- - Office
- - Bedroom
- - Bathroom
- #automation.yaml
- #DJ Panel
- - alias: Play music on Chromecast
- trigger:
- platform: state
- entity_id: input_select.music_station
- action:
- - service: media_player.play_media
- data_template:
- entity_id: >
- {% if is_state('input_select.speakers', 'House') %} media_player.house
- {% elif is_state('input_select.speakers', 'Office') %} media_player.office_display
- {% elif is_state('input_select.speakers', 'Kitchen') %} media_player.kitchen_speaker
- {% elif is_state('input_select.speakers', 'Dining Room') %} media_player.dining_room_speaker
- {% elif is_state('input_select.speakers', 'Living Room') %} media_player.living_room_speaker
- {% elif is_state('input_select.speakers', 'Soundbar') %} media_player.soundbar_speaker
- {% elif is_state('input_select.speakers', 'Bedroom') %} media_player.bedroom_speaker
- {% elif is_state('input_select.speakers', 'Kitchen') %} media_player.kitchen_speaker
- {% elif is_state('input_select.speakers', 'Bathroom') %} media_player.bathroom_speaker
- {% endif %}
- media_content_id: >
- {% if is_state('input_select.music_station', 'Vanilla Deep') %} http://ample-01.radiojar.com/egqwgc0q52mtv
- {% elif is_state('input_select.music_station', 'Vanilla Smooth') %} http://ample-01.radiojar.com/w0b4xf0q52mtv
- {% elif is_state('input_select.music_station', 'Vanilla Greek') %} http://ample-01.radiojar.com/exdncp89fnwtv
- {% elif is_state('input_select.music_station', 'Arion') %} http://ice.onestreaming.com/arion
- {% elif is_state('input_select.music_station', 'Athens Party') %} http://ice.onestreaming.com/athensparty
- {% elif is_state('input_select.music_station', 'MAD Radio') %} http://mediaserver.mad.tv:8000/stream
- {% elif is_state('input_select.music_station', 'Diesi') %} http://diesi.live24.gr/diesi1013
- {% elif is_state('input_select.music_station', 'Derti') %} http://derti.live24.gr/derty1000
- {% elif is_state('input_select.music_station', 'Dromos FM') %} http://dromos898.live24.gr/dromos898
- {% elif is_state('input_select.music_station', 'Sok FM') %} http://sokfm.lalala.gr:8000/stream
- {% elif is_state('input_select.music_station', 'Sfera') %} http://sfera.live24.gr/sfera4132
- {% elif is_state('input_select.music_station', 'Jams 104.3') %} http://15113.live.streamtheworld.com/WBMXFMAAC_SC
- {% elif is_state('input_select.music_station', 'B96') %} http://17793.live.streamtheworld.com/WBBMFM_SC
- {% elif is_state('input_select.music_station', 'Greek Summer 2018 vol2') %} https://gtmasters.duckdns.org/local/GreekSu$
- {% elif is_state('input_select.music_station', 'Greek Summer 2018') %} https://gtmasters.duckdns.org/local/GreekSummer2$
- {% elif is_state('input_select.music_station', 'Παλιά Ελληνικά') %} https://gtmasters.duckdns.org/local/Παλία_Ελληνικά.$
- {% elif is_state('input_select.music_station', 'Αξέχαστα Ελληνικά Λαϊκά') %} https://gtmasters.duckdns.org/local/Αξέχασ$
- {% elif is_state('input_select.music_station', 'Αθάνατα Λαϊκά') %} https://gtmasters.duckdns.org/local/Αθάνατα_Λαϊκά.mp3
- {% elif is_state('input_select.music_station', 'Τα Χρυσά Λαϊκά') %} https://gtmasters.duckdns.org/local/Τα_Χρυσά_Λαϊκά.$
- {% elif is_state('input_select.music_station', 'Summer 2018 vol2') %} https://gtmasters.duckdns.org/local/Summer2018vol$
- {% elif is_state('input_select.music_station', 'Summer 2018') %} https://gtmasters.duckdns.org/local/Summer2018.mp3
- {% elif is_state('input_select.music_station', 'Winter 2017') %} https://gtmasters.duckdns.org/local/Winter2017.mp3
- {% elif is_state('input_select.music_station', 'Fall 2017') %} https://gtmasters.duckdns.org/local/Fall2017.mp3
- {% elif is_state('input_select.music_station', 'Spring 2018') %} https://gtmasters.duckdns.org/local/Spring2018.mp3
- {% endif %}
- media_content_type: 'audio/mp4'
- - alias: Set Volume
- trigger:
- platform: state
- entity_id: input_number.volume
- action:
- service: media_player.volume_set
- data_template:
- entity_id: >
- {% if is_state('input_select.speakers', 'House') %} media_player.house
- {% elif is_state('input_select.speakers', 'Office') %} media_player.office_display
- {% elif is_state('input_select.speakers', 'Kitchen') %} media_player.kitchen_speaker
- {% elif is_state('input_select.speakers', 'Dinning Room') %} media_player.dining_room_speaker
- {% elif is_state('input_select.speakers', 'Living Room') %} media_player.living_room_speaker
- {% elif is_state('input_select.speakers', 'Roaming') %} media_player.soundbar_speaker
- {% elif is_state('input_select.speakers', 'Bedroom') %} media_player.bedroom_speaker
- {% elif is_state('input_select.speakers', 'Bathroom') %} media_player.bathroom_speaker
- {% endif %}
- volume_level: '{{ states.input_number.volume.state }}'
- - alias: Set Volume Office
- trigger:
- platform: state
- entity_id: input_number.volume_office
- action:
- service: media_player.volume_set
- data_template:
- entity_id: media_player.office_display
- volume_level: '{{ states.input_number.volume_office.state }}'
- - alias: Set Volume Kitchen
- trigger:
- platform: state
- entity_id: input_number.volume_kitchen
- action:
- service: media_player.volume_set
- data_template:
- entity_id: media_player.kitchen_speaker
- volume_level: '{{ states.input_number.volume_kitchen.state }}'
- - alias: Set Volume Dining Room
- trigger:
- platform: state
- entity_id: input_number.volume_dining
- action:
- service: media_player.volume_set
- data_template:
- entity_id: media_player.dining_room_speaker
- volume_level: '{{ states.input_number.volume_dining.state }}'
- - alias: Set Volume Living Room
- trigger:
- platform: state
- entity_id: input_number.volume_living
- action:
- service: media_player.volume_set
- data_template:
- entity_id: media_player.living_room_speaker
- volume_level: '{{ states.input_number.volume_living.state }}'
- - alias: Set Volume Soundbar
- trigger:
- platform: state
- entity_id: input_number.volume_soundbar
- action:
- service: media_player.volume_set
- data_template:
- entity_id: media_player.soundbar_speaker
- volume_level: '{{ states.input_number.volume_soundbar.state }}'
- - alias: Set Volume Bedroom
- trigger:
- platform: state
- entity_id: input_number.volume_bedroom
- action:
- service: media_player.bedroom_speaker
- data_template:
- entity_id: media_player.soundbar_speaker
- volume_level: '{{ states.input_number.volume_bedroom.state }}'
- - alias: Set Volume Bathroom
- trigger:
- platform: state
- entity_id: input_number.volume_bathroom
- action:
- service: media_player.bedroom_speaker
- data_template:
- entity_id: media_player.bathroom_speaker
- volume_level: '{{ states.input_number.volume_bathroom.state }}'
Advertisement
Add Comment
Please, Sign In to add comment