Cannot configure Google Home to say a single word using Home Assistant

I am trying to configure Google Home mini to say a single word using Google TTS using Home Assistant and it is turning out to be a nightmare.

I have setup Home Assistant using dockers on mac. I have linked Home Assistant (hass.io) using Google Home in Android phone. But no luck. My simple trigger is to say phrase at a particular time but it does not work.

2018-12-29 18:16:53 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):

  File "/usr/src/app/homeassistant/components/automation/__init__.py", line 294, in async_trigger
    await self._async_action(self.entity_id, variables, context)

  File "/usr/src/app/homeassistant/components/automation/__init__.py", line 378, in action
    await script_obj.async_run(variables, context)

  File "/usr/src/app/homeassistant/helpers/script.py", line 130, in async_run
    await self._handle_action(action, variables, context)

  File "/usr/src/app/homeassistant/helpers/script.py", line 172, in _handle_action
    action, variables, context)

  File "/usr/src/app/homeassistant/helpers/script.py", line 261, in _async_call_service
    context=context

  File "/usr/src/app/homeassistant/helpers/service.py", line 81, in async_call_from_config
    domain, service_name, service_data, blocking=blocking, context=context)

  File "/usr/src/app/homeassistant/core.py", line 1121, in async_call
    self._execute_service(handler, service_call))

  File "/usr/src/app/homeassistant/core.py", line 1143, in _execute_service
    await handler.func(service_call)

  File "/usr/src/app/homeassistant/components/tts/__init__.py", line 152, in async_say_handle
    DOMAIN_MP, SERVICE_PLAY_MEDIA, data, blocking=True)

  File "/usr/src/app/homeassistant/core.py", line 1098, in async_call
    raise ServiceNotFound(domain, service) from None

homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service media_player.play_media not found')

My configuration.yml looks like this:

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 0
  longitude: 0
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: UTC
  # Customization file
  customize: !include customize.yaml

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
discovery:

conversation:
history:
logbook:

# Enables a map showing the location of tracked devices
map:

# Track the sun
sun:

# Sensors
sensor:
  # Weather prediction
  - platform: yr

# Text to speech
tts:
  - platform: google

# Cloud
cloud:

# Google Home
google_assistant:
  project_id: home-assistant-227006
  api_key: AIzaSyDQ25JK81ybc06eRmOBMekAu7Koimj7u4w
  exposed_domains:
    - media_player
    - script
  entity_config:
    media_player.family_room_speaker:
      name: 'Family Room Speaker'


# group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

My automation.yaml file is

- id: '1546062476966'
  alias: Test
  trigger:
  - at: '18:18'
    platform: time
  condition: []
  action:
  - service: tts.google_say
    entity_id: media_player.family_room_speaker
    data:
      message: 'May the Force be with you.'

Please help.

Try this

configuration.yaml

tts: 
  platform: google
  cache: true
  cache_dir: /tmp/tts
  time_memory: 300
  language: 'en-au'

automation.yaml

- alias: Test
  trigger:
    platform: time
    at: "18:18:00"
  action:
    service: tts.google_say
    entity_id: media_player.family_room_speaker
    data_template:
      message: 'May the Force be with you.'

I was able to fix it by adding this in configuration file.

# Media player
cast:
  media_player:
  - host: 192.168.1.2

I think error was saying that it could not find media player, which was fixed by adding this block.

As I was running in docker, I had to add following block also and it started working fine. Nothing else was changed.

# HTTP: https://www.home-assistant.io/components/http/ 
http:
  base_url: http://192.168.1.4:8123

I hope it helps someone.

“192.168.1.2”

What device are you pointing at with that?