Action to Alexa TTS after presence changes

Hello All,

Noob here to HA. Not sure how long until I get the hang of this. But hoepfully I will loose noob status soon. Im about a week into tinkering and 5-6 weeks into reading up on the subject.

I have set up Alexa on my HA, using the alexa.py from the keaton taylor github page.

I can control the alexa from media player although the TTS on the media player does not work it is for google home only, I have been able to successfully send a TTS message to alexa using the dev tools services.

I have then created an automation, but I am not sure how I should be putting this into the automations.yaml

  - entity_id: device_tracker.rking
    for: '30'
    from: not_home
    platform: state
    to: home
  condition: []
  action:
  - data:
      entitiy_id: media_player.kitchen
      message: Hello welcome home
    service: media_player.alexa_tts

Assistance would be greatly appreciated

Thanks in advance.