mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-10 10:24:42 +00:00
Add twitch controls. Improve TV and Shield
This commit is contained in:
@@ -1,36 +1,8 @@
|
||||
# https://www.home-assistant.io/integrations/sonos
|
||||
sonos:
|
||||
media_player:
|
||||
hosts: !secret sonos_hosts
|
||||
|
||||
# https://www.home-assistant.io/integrations/spotify
|
||||
spotify:
|
||||
client_id: !secret spotify_client_id
|
||||
client_secret: !secret spotify_client_secret
|
||||
|
||||
group:
|
||||
all_sonos:
|
||||
name: All Sonos
|
||||
entities:
|
||||
- media_player.master_bedroom
|
||||
- media_player.living_room
|
||||
- media_player.kitchen
|
||||
- media_player.bathroom
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
sonos_recoverable:
|
||||
friendly_name: Sonos recoverable
|
||||
entity_id: media_player.master_bedroom
|
||||
value_template: >-
|
||||
{% if state_attr('media_player.master_bedroom', 'media_content_id').startswith('x-sonos-spotify:spotify')
|
||||
or state_attr('media_player.master_bedroom', 'media_content_id').startswith('x-sonosapi-hls-static') %}
|
||||
True
|
||||
{% else %}
|
||||
False
|
||||
{% endif %}
|
||||
|
||||
script:
|
||||
music_play:
|
||||
alias: Music · Play
|
||||
@@ -49,14 +21,6 @@ script:
|
||||
entity_id: media_player.master_bedroom
|
||||
source: "{{ playlist | default('Evening Chill') }}"
|
||||
|
||||
music_join_sonoses:
|
||||
alias: Music · Join Sonoses
|
||||
sequence:
|
||||
- service: sonos.join
|
||||
entity_id: group.all_sonos
|
||||
data_template:
|
||||
master: media_player.master_bedroom
|
||||
|
||||
automation:
|
||||
- alias: Music · Play/Pause on Magic Cube Knock
|
||||
trigger:
|
||||
|
||||
Reference in New Issue
Block a user