Home Assistant - Spotify integratie en afspelen op soundbar

Pagina: 1
Acties:

Onderwerpen

Vraag


  • pentaw1nz
  • Registratie: Mei 2013
  • Laatst online: 07:26
Hi,

Sinds kort heb ik homeassistant draaien en een leuk dashboard op een Samsung A11 plus aan de muur.
Heb veel zaken al naar wens kunnen instellen, zoals verlichting, warmtepomp, stroomprijzen, auto en laadpaal koppelingen etc.

Waar ik niet uit komt:
Spotify starten op de soundbar, na lange inactiviteit.
Bij het Source knopje verdwijnt 'Soundbar' na lange inactiviteit. Ik heb al 10 scripts geprobeerd om spotify op de soundbar te laten afspelen, maar krijg het niet voor elkaar.
Het knopje soundbaar aan/uit werkt prima, maar tot nu toe moet ik steeds mijn telefoon pakken om spotify op de soundbar te laten spelen (over Wi-Fi?). Daarna kan ik past de spotify integratie op mijn HA dashboard gebruiken.

Zijn er mogelijkheden waarmee ik het direct vanuit mijn Dashboard/HA kan doen? En niet steeds de telefoon als tussenstap.

Knoppen:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
type: grid
grid_options:
  columns: 12
columns: 2
square: false
cards:
  - type: tile
    entity: script.spotify_starten_op_soundbar
    name: Spotify starten op Soundbar
    icon: mdi:spotify
    color: green
    vertical: false
    tap_action:
      action: perform-action
      perform_action: script.spotify_starten_op_soundbar
  - type: tile
    entity: media_player.woonkamer_soundbar
    name: Soundbar aan
    vertical: false
    tap_action:
      action: perform-action
      perform_action: media_player.toggle
      target:
        entity_id: media_player.woonkamer_soundbar
    features_position: bottom
Laatst geprobeerde script voor spotify starten op soundbar. Met eerst AV cast radio als tussenstap. Maar ook dat werkte niet.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
alias: Spotify starten op Soundbar
sequence:
  - action: media_player.turn_on
    target:
      entity_id: media_player.woonkamer_soundbar
  - action: media_player.play_media
    target:
      entity_id: media_player.woonkamer_av_soundbar
    data:
      media:
        media_content_id: https://icecast.omroep.nl/radio2-bb-mp3
        media_content_type: music
        metadata: {}
  - delay:
      seconds: 6
  - action: media_player.media_stop
    target:
      entity_id: media_player.woonkamer_av_soundbar
  - delay:
      seconds: 3
  - action: media_player.select_source
    target:
      entity_id: media_player.woonkamer_spotify_NAAM
    data:
      source: Soundbar
  - delay:
      seconds: 2
  - action: media_player.media_play
    target:
      entity_id: media_player.woonkamer_spotify_NAAM

PV: 13 x LG Solar 320N1K-A5 - NeON2 / WP: Adlar Aurora II 6kw / WPB: Atlantic Explorer 200l / jaren 70 woning gasloos sinds 10-2024 / Peblar business laadpaal / 25kw plugin hybride

Alle reacties


  • pentaw1nz
  • Registratie: Mei 2013
  • Laatst online: 07:26
In ander topic de tip gekregen dat het met Music Assistant zou moeten kunnen. Dat geprobeerd en lijkt de oplossing te zijn.
Topic kan dicht.

PV: 13 x LG Solar 320N1K-A5 - NeON2 / WP: Adlar Aurora II 6kw / WPB: Atlantic Explorer 200l / jaren 70 woning gasloos sinds 10-2024 / Peblar business laadpaal / 25kw plugin hybride