Skip to content

Commit

Permalink
Wrap found target in list (home-assistant#3809)
Browse files Browse the repository at this point in the history
* Wrap found target in list

* Fix test_messages_to_targets_route
  • Loading branch information
robbiet480 authored and balloob committed Oct 11, 2016
1 parent b19ec21 commit 9b98d47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/notify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def notify_message(notify_service, call):
kwargs[ATTR_TITLE] = title.render()

if targets.get(call.service) is not None:
kwargs[ATTR_TARGET] = targets[call.service]
kwargs[ATTR_TARGET] = [targets[call.service]]
else:
kwargs[ATTR_TARGET] = call.data.get(ATTR_TARGET)

Expand Down
2 changes: 1 addition & 1 deletion tests/components/notify/test_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_messages_to_targets_route(self):

assert {
'message': 'my message',
'target': 'test target id',
'target': ['test target id'],
'title': 'my title',
'data': {'hello': 'world'}
} == data

0 comments on commit 9b98d47

Please sign in to comment.