Skip to content

Commit

Permalink
Fix empty yaml config
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Dec 16, 2020
1 parent c88ab31 commit ed148f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/yandex_station/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
vol.Optional(CONF_USERNAME): cv.string,
vol.Optional(CONF_PASSWORD): cv.string,
vol.Optional(CONF_TOKEN): cv.string,
vol.Optional(CONF_TTS_NAME, default='yandex_station_say'): cv.string,
vol.Optional(CONF_TTS_NAME): cv.string,
vol.Optional(CONF_INTENTS): dict,
vol.Optional(CONF_INCLUDE): cv.ensure_list,
vol.Optional(CONF_DEVICES): {
Expand Down Expand Up @@ -174,7 +174,7 @@ async def yandex_station_say(call: ServiceCall):
blocking=True)

config = hass.data[DOMAIN][DATA_CONFIG]
service_name = config[CONF_TTS_NAME]
service_name = config.get(CONF_TTS_NAME, 'yandex_station_say')
hass.services.async_register('tts', service_name, yandex_station_say)


Expand Down

0 comments on commit ed148f6

Please sign in to comment.