@property
    def state_attributes(self):
        attr = {}

        if self.gps:
            attr[ATTR_LATITUDE] = self.gps[0]
            attr[ATTR_LONGITUDE] = self.gps[1]
            attr[ATTR_GPS_ACCURACY] = self.gps_accuracy

        if self.battery:
            attr[ATTR_BATTERY] = self.battery

        return attr
Return the device state attributes.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/device_tracker/__init__.py/Device.state_attributes