Add devices detected by ping as SOURCE_TYPE_ROUTER instead of GPS (#5625)
This commit is contained in:
parent
14f8bc26d1
commit
b080ae154c
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ from datetime import timedelta
|
|||
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
|
||||
|
@ -66,7 +66,7 @@ class Host:
|
|||
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue