Hi,
I am trying to control my HA Spotify component from Snips but ran into some issues I was not able to solve on my own so far.
I have Both Snips and HA(virtual env) on a Raspberry 3B+ running the recent version of Raspbian. I followed the documentation about setting up the Spotify media_player component in HA, what works pretty good.
Now I want to use the integration with snips to control the playback via voice commands.
This is what I have added to my configuration.yaml:
mqtt:
broker: 127.0.0.1
port: 1883
media_player:
- platform: spotify
client_id: XXXXXX
client_secret:XXXXXX
python_script:
snips:
intent_script:
CryptoWarrior:play:
action:
service: media_player.media_play_pause
CryptoWarrior:next:
action:
service: media_player.media_next
In Snips, I use the CryptoWarrior music plugin. I am trying
service_data = { 'entity_id': 'media_player.spotify' }
hass.services.call('media_player', 'media_play_pause', service_data, False)
for the “play” intent and
hass.services.call('media_player', 'media_next_track')
for “next”.
As far as I understood the documentation, the simple version of the next-intent should be enough, but I tried both versions to see if there is a difference. The first wierd thing that happens are some changes to my configuration.yaml after deploying the assistant to Snips:
mqtt:
broker: 127.0.0.1
port: 1883
media_player:
- platform: spotify
client_id: XXXXXXX
client!secret: XXXXXX
python_script:
snips:
intent_script: {}
Is this normal behaviour? This even breaks my Spotify since it changes the “client_secret” line to “client!secret”. My old configuration gets backed up in the HA folder. If I put it back and restart HA, I get the following error after issuing the voice command:
2018-11-09 21:35:03 WARNING (MainThread) [homeassistant.components.snips] Received unknown intent CryptoWarrior:play
Any help or hint would be highly appreciated