Skip to content

Commit

Permalink
Add devices detected by ping as SOURCE_TYPE_ROUTER instead of GPS (ho…
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelarnauts authored and Pedro Rodrigues committed Feb 8, 2017
1 parent 486302c commit d2ebd03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/device_tracker/ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import voluptuous as vol

from homeassistant.components.device_tracker import (
PLATFORM_SCHEMA, DEFAULT_SCAN_INTERVAL)
PLATFORM_SCHEMA, DEFAULT_SCAN_INTERVAL, SOURCE_TYPE_ROUTER)
from homeassistant.helpers.event import track_point_in_utc_time
from homeassistant import util
from homeassistant import const
Expand Down Expand Up @@ -66,7 +66,7 @@ def update(self, see):
failed = 0
while failed < self._count: # check more times if host in unreachable
if self.ping():
see(dev_id=self.dev_id)
see(dev_id=self.dev_id, source_type=SOURCE_TYPE_ROUTER)
return True
failed += 1

Expand Down

0 comments on commit d2ebd03

Please sign in to comment.