1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Config entry device tracker (#24040)

* Move zone helpers to zone root

* Add config entry support to device tracker

* Convert Geofency

* Convert GPSLogger

* Track unsub per entry

* Convert locative

* Migrate OwnTracks

* Lint

* location -> latitude, longitude props

* Lint

* lint

* Fix test
This commit is contained in:
Paulus Schoutsen
2019-05-25 13:34:53 -07:00
committed by GitHub
parent 144b530045
commit e6d7f6ed71
20 changed files with 946 additions and 517 deletions

View File

@@ -142,7 +142,7 @@ class TestComponentZone(unittest.TestCase):
]
})
self.hass.block_till_done()
active = zone.zone.active_zone(self.hass, 32.880600, -117.237561)
active = zone.async_active_zone(self.hass, 32.880600, -117.237561)
assert active is None
def test_active_zone_skips_passive_zones_2(self):
@@ -158,7 +158,7 @@ class TestComponentZone(unittest.TestCase):
]
})
self.hass.block_till_done()
active = zone.zone.active_zone(self.hass, 32.880700, -117.237561)
active = zone.async_active_zone(self.hass, 32.880700, -117.237561)
assert 'zone.active_zone' == active.entity_id
def test_active_zone_prefers_smaller_zone_if_same_distance(self):
@@ -182,7 +182,7 @@ class TestComponentZone(unittest.TestCase):
]
})
active = zone.zone.active_zone(self.hass, latitude, longitude)
active = zone.async_active_zone(self.hass, latitude, longitude)
assert 'zone.small_zone' == active.entity_id
def test_active_zone_prefers_smaller_zone_if_same_distance_2(self):
@@ -200,7 +200,7 @@ class TestComponentZone(unittest.TestCase):
]
})
active = zone.zone.active_zone(self.hass, latitude, longitude)
active = zone.async_active_zone(self.hass, latitude, longitude)
assert 'zone.smallest_zone' == active.entity_id
def test_in_zone_works_for_passive_zones(self):