henrikrox
(Henrikrox)
January 15, 2020, 7:36am
1
### Scener / OFTE BRUKT (placeholder) ###
- type: glance
title: Ofte brukt
show_state: false
columns: 4
entities:
- entity: media_player.sonos_sonos_one
tap_action:
action: call-service
service: media_player.select_source
service_data:
entity_id: media_player.sonos_sonos_one
source_list: "NRK Nyheter"
This doesnt return an error, but it doesnt start playing, any tips?
Try
- type: glance
title: Ofte brukt
show_state: false
columns: 4
entities:
- entity: media_player.sonos_sonos_one
tap_action:
action: call-service
service: media_player.select_source
service_data:
entity_id: media_player.sonos_sonos_one
source: "NRK Nyheter"
henrikrox
(Henrikrox)
January 15, 2020, 8:28am
3
henrikrox:
type: glance title: Ofte brukt show_state: false columns: 4 entities: - entity: media_player.sonos_sonos_one tap_action: action: call-service service: media_player.select_source service_data: entity_id: media_player.sonos_sonos_one source_list: “NRK Nyheter”
confused, isnt that same as what i posted?
Do you see your source when you paste this
{{state_attr("media_player.sonos_sonos_one", "source_list") }}
in developer-tools?
No, you posted
source_list: "NRK Nyheter"
I’ve posted
source: "NRK Nyheter"
henrikrox
(Henrikrox)
January 15, 2020, 8:30am
6
{{state_attr("media_player.sonos_sonos_one", "source") }}
and
{{state_attr("media_player.sonos_sonos_one", "source_list") }}
doesnt work
state_attr("media_player/sonos_sonos_one", "source") }} Service not found.
state_attr("media_player/sonos_sonos_one", "source_list") }} Service not found.
What happens when you do this?
henrikrox
(Henrikrox)
January 15, 2020, 8:56am
10
This worked, playlist started playing, hm weird
you could try to make a script
set_source:
sequence:
- service: media_player.select_source
data:
entity_id: media_player.sonos_sonos_one
source: "NRK Nyheter"
and call that script from your glance card
- type: glance
title: Ofte brukt
show_state: false
columns: 4
entities:
- entity: media_player.sonos_sonos_one
tap_action:
action: call-service
service: script.set_source
henrikrox
(Henrikrox)
January 15, 2020, 9:06am
12
will try, thanks a lot for your help
greatly appreciated
henrikrox
(Henrikrox)
January 15, 2020, 9:12am
13
yep that worked, thanks a bunch and hats off to you