Custom radio stream integration with google home-mini and ifttt

Since few days in Poland we have a new radio station called “new world”. Unfortunately it is still not available on tuneIn so you can’t simply call it like hey google play radio new world. We can do it with help of ifttt service integration and short script.
What we need:
raspberry pi with home assistant :wink:
google home-mini speaker
1 - your home-assistant has to accessible from “outside” - that means that you have to be able to log in to home assistant from internet - best and easiest way is to install duckdns plugin - how to do it you can read here:
2 - install integration with ifttt. To do this read this article:
3 - create a access security token for ifttt aplication - to do that go to your profile in home assistant and click “create token”

4. create short script - go to configuration tab in your home-assistant, click scripts and add new script by pressing orange “plus” sign. Script should include these lines:

  alias: new_world
  - data:
      media_content_type: audio/mp4
    entity_id: media_player.home_mini
    service: media_player.play_media


from GUI -
call a service,
service ->media_player.play_media->media_player.home_mini->
media_content_id: ‘
media_content_type: audio/mp4

In media_content_id: you should put stream address of your favorite radio station

  1. go to the web page: after logging in press create
    than click on black “if”, find service google assistant, choose “Say a simple phrase” and fill in form, click create trigger.
    After that click black sign “that” and search for “webhooks”. Fill in a form with:
    URL: https://adress_of_ your_home_assistant:8123/api/webhook/security_token_that_you_generated
{ "action": "call_service", "service": "script.turn_on", "entity_id": "name.of.the.script.that you've created" }

Method: POST
Content Type (optional): application/json

6 - that’s it now when you say phrase that filed in will run the script and play your favorite radio!!