Revert "[device_tracker] Don't clear GPS coordinates when using two device trackers." (#4851)
This commit is contained in:
parent
e0552ad899
commit
46cad514d4
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue