From c23375a18b1793dfe0e9066763c85bf45cbf255c Mon Sep 17 00:00:00 2001 From: Philip Lundrigan Date: Wed, 30 Dec 2015 17:30:20 -0700 Subject: [PATCH] Add case for test message --- homeassistant/components/device_tracker/locative.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/device_tracker/locative.py b/homeassistant/components/device_tracker/locative.py index cb8e42fd1c4..72e458bc314 100644 --- a/homeassistant/components/device_tracker/locative.py +++ b/homeassistant/components/device_tracker/locative.py @@ -77,7 +77,12 @@ def _handle_get_api_locative(hass, see, handler, path_match, data): # the previous zone was exited. The enter message will be sent # first, then the exit message will be sent second. handler.write_json_message( - "Ignoring transition to {}".format(location_name)) + "Ignoring transition from {}".format(location_name)) + + elif direction == 'test': + # In the app, a test message can be sent. Just return something to + # the user to let them know that it works. + handler.write_text("Received test message.") else: handler.write_json_message(