diff --git a/homeassistant/components/device_tracker/__init__.py b/homeassistant/components/device_tracker/__init__.py
index d716422b38c..38c66ee3949 100644
--- a/homeassistant/components/device_tracker/__init__.py
+++ b/homeassistant/components/device_tracker/__init__.py
@@ -30,7 +30,7 @@ import os
import threading
from homeassistant.bootstrap import prepare_setup_platform
-from homeassistant.components import discovery, group
+from homeassistant.components import discovery, group, zone
from homeassistant.config import load_yaml_config_file
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import config_per_platform
@@ -40,10 +40,11 @@ import homeassistant.util.dt as dt_util
from homeassistant.helpers.event import track_utc_time_change
from homeassistant.const import (
- ATTR_ENTITY_PICTURE, DEVICE_DEFAULT_NAME, STATE_HOME, STATE_NOT_HOME)
+ ATTR_ENTITY_PICTURE, ATTR_LATITUDE, ATTR_LONGITUDE, DEVICE_DEFAULT_NAME,
+ STATE_HOME, STATE_NOT_HOME)
DOMAIN = "device_tracker"
-DEPENDENCIES = []
+DEPENDENCIES = ['zone']
GROUP_NAME_ALL_DEVICES = 'all devices'
ENTITY_ID_ALL_DEVICES = group.ENTITY_ID_FORMAT.format('all_devices')
@@ -70,8 +71,6 @@ DEFAULT_HOME_RANGE = 100
SERVICE_SEE = 'see'
-ATTR_LATITUDE = 'latitude'
-ATTR_LONGITUDE = 'longitude'
ATTR_MAC = 'mac'
ATTR_DEV_ID = 'dev_id'
ATTR_HOST_NAME = 'host_name'
@@ -366,7 +365,14 @@ class Device(Entity):
elif self.location_name:
self._state = self.location_name
elif self.gps is not None:
- self._state = STATE_HOME if self.gps_home else STATE_NOT_HOME
+ zone_state = zone.in_zone(self.hass, self.gps[0], self.gps[1])
+ if zone_state is None:
+ self._state = STATE_NOT_HOME
+ elif zone_state.entity_id == zone.ENTITY_ID_HOME:
+ self._state = STATE_HOME
+ else:
+ self._state = zone_state.name
+
elif self.stale():
self._state = STATE_NOT_HOME
self.last_update_home = False
diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py
index 7dd00d1c721..fbdfad56a65 100644
--- a/homeassistant/components/frontend/version.py
+++ b/homeassistant/components/frontend/version.py
@@ -1,2 +1,2 @@
""" DO NOT MODIFY. Auto-generated by build_frontend script """
-VERSION = "e06fe517c5a089673b3f4842100c24a6"
+VERSION = "8d460d7298e41397b4f94ef103b2a067"
diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html
index 2603f9f8d3f..f88bd7884da 100644
--- a/homeassistant/components/frontend/www_static/frontend.html
+++ b/homeassistant/components/frontend/www_static/frontend.html
@@ -5636,9 +5636,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
iron-image {
border-radius: 50%;
- }[[value]]
[[value]]