From 28f4283b404894c964dea14ba4b4d3b34fc2c5ae Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Fri, 29 Jan 2016 22:04:02 -0500 Subject: [PATCH] Validate target --- homeassistant/components/notify/googlevoice.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/notify/googlevoice.py b/homeassistant/components/notify/googlevoice.py index 2e0cf205097..a1ce39a6129 100644 --- a/homeassistant/components/notify/googlevoice.py +++ b/homeassistant/components/notify/googlevoice.py @@ -45,6 +45,10 @@ class GoogleVoiceSMSNotificationService(BaseNotificationService): """ Send SMS to specified target user cell. """ targets = kwargs.get(ATTR_TARGET) + + if not isinstance(targets, list): + targets = [targets] + self.voice.login(self.username, self.password) for target in targets: