From 46cad514d46480e3aa17f9991fa7f41f14182246 Mon Sep 17 00:00:00 2001 From: Johann Kellerman Date: Sun, 11 Dec 2016 19:18:11 +0200 Subject: [PATCH] Revert "[device_tracker] Don't clear GPS coordinates when using two device trackers." (#4851) --- homeassistant/components/device_tracker/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/device_tracker/__init__.py b/homeassistant/components/device_tracker/__init__.py index ba5e28ff48f..d497ea4c314 100644 --- a/homeassistant/components/device_tracker/__init__.py +++ b/homeassistant/components/device_tracker/__init__.py @@ -426,11 +426,12 @@ class Device(Entity): if attributes: self._attributes.update(attributes) + self.gps = None + if gps is not None: try: self.gps = float(gps[0]), float(gps[1]) except (ValueError, TypeError, IndexError): - self.gps = None _LOGGER.warning('Could not parse gps value for %s: %s', self.dev_id, gps)