SOLVED: Attribute 'Group" error when calling Google TTS

I am getting an error in my log stating there is no ‘group’ attribute and fails to announce my Google TTS message. I worked before. But since the update to 0.78 and the announcement of paid service for the cloud, it has not worked.

automation:

- id: '1534539041835'
  alias: "Google Todays Time/Temperature"
  trigger:
    platform: time
    at: '09:00:00'
  condition:
    condition: time
    weekday:
    - sun
    - mon
    - tue
    - wed
    - thu
    - fri
    - sat
  action:
  - service: media_player.turn_on
    entity_id:
    - media_player.family_room_speaker
    - media_player.living_room_speaker
  - delay: 00:00:02
  - service: media_player.volume_set
    data_template:
      entity_id:
      - media_player.family_room_speaker
      - media_player.living_room_speaker
      volume_level: '0.7'
  - delay: 00:00:02
  - service: tts.google_say
    entity_id:
    - media_player.family_room_speaker
    - media_player.living_room_speaker
    data_template:
      message: "The current time is {{ states('sensor.clock_time') }},
        Today's weather will be a {{ states('sensor.dark_sky_icon') }},
        with a high of {{ states('sensor.dark_sky_daytime_high_temperature') }} degrees."
      cache: false
  - delay: 00:00:15
  - service: media_player.turn_off
    entity_id:
    - media_player.family_room_speaker
    - media_player.living_room_speaker

traceback:

2018-09-20 09:56:10 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall tts.google_say (c:d42417654cae40589b5a4472389d13da): cache=$
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1117, in _event_to_service_call
    await service_handler.func(service_call)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tts/__init__.py", line 134, in async_say_handle
    options=options
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tts/__init__.py", line 300, in async_get_url
    engine, key, message, use_cache, language, options)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tts/__init__.py", line 313, in async_get_tts_audio
    message, language, options)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tts/google.py", line 83, in async_get_tts_audio
    token.calculate_token, part)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/gtts_token/gtts_token.py", line 28, in calculate_token
    seed = self._get_token_key()
  File "/srv/homeassistant/lib/python3.5/site-packages/gtts_token/gtts_token.py", line 62, in _get_token_key
    a = re.search("a\\\\x3d(-?\d+);", tkk_expr).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

Does anyone have any ideas what could be the cause?

Please paste the automation that is generating the error.

sorry. i have edited the post. it is all my automations though. I only have 3 I am starting off and tailoring before going full blown.

Yeah, the automations are fine looks like a bug that needs reporting. :+1:

i was just notified of https://github.com/home-assistant/home-assistant/issues/16749

thank you for your help @anon43302295 i appreciate it. but the post I mentioned was the correction to my issue.

1 Like