Skip to content

Commit

Permalink
fix: load notify targets as json
Browse files Browse the repository at this point in the history
closes #761
  • Loading branch information
alandtse committed Jun 6, 2020
1 parent abdeecc commit 59f4842
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/alexa_media/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639
"""
import asyncio
import json
import logging

from homeassistant.components.notify import (
Expand Down Expand Up @@ -156,7 +157,7 @@ async def async_send_message(self, message="", **kwargs):
title = kwargs.get(ATTR_TITLE) if ATTR_TITLE in kwargs else ATTR_TITLE_DEFAULT
data = kwargs.get(ATTR_DATA)
if isinstance(targets, str):
targets = [targets]
targets = json.loads(targets)
entities = self.convert(targets, type_="entities")
try:
entities.extend(self.hass.components.group.expand_entity_ids(entities))
Expand Down

0 comments on commit 59f4842

Please sign in to comment.