From 9b98d470c2b42dd776eca165d20cefdb6e9ceba0 Mon Sep 17 00:00:00 2001 From: Robbie Trencheny Date: Mon, 10 Oct 2016 22:31:15 -0700 Subject: [PATCH] Wrap found target in list (#3809) * Wrap found target in list * Fix test_messages_to_targets_route --- homeassistant/components/notify/__init__.py | 2 +- tests/components/notify/test_demo.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/notify/__init__.py b/homeassistant/components/notify/__init__.py index e56dfa5586d..c779c78d15e 100644 --- a/homeassistant/components/notify/__init__.py +++ b/homeassistant/components/notify/__init__.py @@ -100,7 +100,7 @@ def setup(hass, config): 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) diff --git a/tests/components/notify/test_demo.py b/tests/components/notify/test_demo.py index b996b479ef9..0d41f0606e5 100644 --- a/tests/components/notify/test_demo.py +++ b/tests/components/notify/test_demo.py @@ -152,7 +152,7 @@ data_template: assert { 'message': 'my message', - 'target': 'test target id', + 'target': ['test target id'], 'title': 'my title', 'data': {'hello': 'world'} } == data