@Danielhiversen any update for this component?
Would love to have this component the default installation of HA.
Trying to get it set up. When I turn on the switch to play - give the following warning and turns off. Any ideas guys?
WARNING (Thread-1) [homeassistant.helpers.entity] 'update_ha_state' is deprecated. Use 'schedule_update_ha_state' instead.
Iâm not seeing any of the auto-generated playlists (i.e. thumbs up). Any way to include those?
Does anyone know where I went wrong in setting this up? I have the input select components created properly but I am getting the error in the logbook saying âcannot setup switch.gmusicâ. Iâve run the script in the above thread and it returns true, and I have âplaylist: musicâ set up in my config. I am on 0.47.1 and I was able to set up the test hello world custom component without any trouble. Any ideas?
@Danielhiversen it seems that the script isnât executable for me, as I keep getting âimporterror: no module named asyncioâ. Iâm able to use Mobileclient in ipython, but I canât get the script to work. I have python installed
I also struggled with this in the begining, being very new to this platform.
Some tips to get it working:
- Put the
gmusic.py
into a folder<config directory>/custom_components/switch
- Make sure that
custom_components/switch
is owned byhomeassistant
(the commandsudo chown -R homeassistant:homeassistant custom_components
withgmusic.py
already in there, should do the trick.
@Danielhiversen
Indeed, thanks a lot for this platform. Is there any way to select something else than a playlist, and are you planning to look into it? To be sure, Iâm not trying to push or ask for additional features, it would just be interesting to know if youâre planning to expand this.
Kind regards,
Erwin
I do not have any plans to add any features to the component. But you or someone else are welcome to contribute.
I wish I had the knowledge to do so Unfortunatly, Iâm not really a programmer. But good to know, than we take this script from you as is.
Just to know, can it be done using to the gmusicapi?
Kind Regards,
Erwin
Thanks @ErwinP, unfortunately that didnât work. I tried the chown command with pi, as homeassistant isnât valid username for me. The script is working fine (I was dumb and running it with python, not python3). My path is /home/pi/.homeassistan/custom_components
, so I tried sudo chown pi -R /home/pi/.homeassistan/custom_components
but that didnât help matters
Edit: I got the switch to show up in HASS. I didnât realize that I had to have switch directory in the custom_component dir as well.
I would love that too!
@Danielhiversen: would you consider turning this into a Hass.io add-on?
Thanks!
B
thanks a lot âŚworks just perfect!
only thing that didnât work was the login. Iâm using two-factor-auth and had to create an app password https://myaccount.google.com/apppasswords and use it instead of my google account password.
JKW
just to mention it: iâve created a modified version of you code that will create a google music radio, based on the selected list and stream that to my chromcast ⌠still 98% your code, so thanks again
JKW
https://github.com/KoljaWindeler/ESP8266_mqtt_pwm_pir_temp/blob/master/HA/custom_components/switch/gmusic_radio.py
Hello Every one i am making ios app by using rm pro and tc2 switch but i am unable to communicate them so any one who work on this tell me thanks in advace
@JKW
Hi
Does it work to select either playlists or radio stations? It seems to select only playlists
it will CREATE a radio station based on the selected playlist and play it
JKW
Now it does sound logic (I assumed initially it would feed the list of radio stations created in the account similar to the playlists)
Thanks
Really a great addition to my HA, thank you very much! But I got minor issue and was wondering if this has been happening to anybody else:
Sometimes when listening to a playlist the player will skip to next track midway in the current track. I have not been able to reproduce this issue as it will only happen sometimes. Did this happen to anyone else?