pkozul / ha-tts-bluetooth-speaker

TTS Bluetooth Speaker for Home Assistant
192 stars 41 forks source link

error - ? #8

Open oldfart101 opened 6 years ago

oldfart101 commented 6 years ago
2018-07-06 17:13:56 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall media_player.play_media: media_content_id=http://192.168.1.49:8123/api/tts_proxy/f7ff9e8b7bb2e09b70935a5d785e0cc5d9d0abf0_en_-_google.mp3, media_content_type=music, entity_id=['media_player.tts_bluetooth_speaker']>
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1007, in _event_to_service_call
    await service_handler.func(service_call)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/__init__.py", line 441, in async_service_handler
    await getattr(player, method['method'])(**params)
  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 "/home/homeassistant/.homeassistant/custom_components/media_player/tts_bluetooth_speaker.py", line 167, in play_media
    while self._hass.states.get(bluetooth_tracker.DOMAIN + '.' + bluetooth_tracker.ENTITY_ID).state == bluetooth_tracker.STATE_ON:
AttributeError: 'NoneType' object has no attribute 'state'