Google music in HA

@edif30

Sorry about that. I thought I already did this but it looks like I missed it :confused:

Anyways you can please try this.
Open custom_components/gmusic/switch.py. On Line 167 you should see the following.

#        self.hass.services.call(DOMAIN_MP, SERVICE_TURN_OFF, data, blocking=True)

Remove the hash (#) at the beginning so the line now looks like this.

       self.hass.services.call(DOMAIN_MP, SERVICE_TURN_OFF, data, blocking=True)

You’ll also need to restart Home Assistant.


UPDATED 06/01/2019:

I’ve also been playing around with changing this to a media player

It’s not perfect but overall seems to work rather well. I have most of the media_player services working.

You can test this out alongside the current gmusic switch and even use the same login information, including decive_id. However you can only play music using either one at a time.

2 Likes

Works great! And nice work on the other thing!

Hi all,

I forked Troy’s gmusic_player and modded it to use Artist / Album selection from google music.
Point is to get rid of playlists and 1000 track limit.

Now i can select All Artists and All Albums and generate queue from all my songs.
Or just select Artist and roll out shuffled queue from all it’s albums.

Also replaced shuffle, shuffle_mode to play_mode = (normal,shuffle,random,shuffle random)
And moved speakers to !secret:
gmusic_player.yaml ->
options: !secret gmusic_speakers

secret.yaml ->

gmusic_speakers:

  • office_speaker
  • patio_speaker
  • home_group

Feel free to test it out, it’s a hack, this is my first attempt on custom_component and i have only basics on python.
So i’ll hope this will be usefull for someone, and all help on this would be great!

miikka

ps.
As i have no subscription, i have no idea how this works with subscription.
I’'m using free account with my own library

1 Like

Looking forward to giving this a try. Thanks for sharing