mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Add devices detected by ping as SOURCE_TYPE_ROUTER instead of GPS (#5625)
This commit is contained in:
parent
14f8bc26d1
commit
b080ae154c
@ -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…
x
Reference in New Issue
Block a user