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

New scanner device tracker and ZHA device tracker support (#24584)

* initial implementation for zha device trackers

* constant

* review comments

* Revert "review comments"

This reverts commit 2130823566820dfc114dbeda08fcdf76ed47a4e7.

* rename device tracker entity

* update trackers

* raise when not implemented

* Update homeassistant/components/device_tracker/config_entry.py

Review comment

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* move source type to base state attrs

* review comments

* review comments

* review comments

* fix super call

* fix battery and use last seen from device

* add test

* cleanup and add more to test

* cleanup post zha entity removal PR

* add tests for base entities

* rework entity tests
This commit is contained in:
David F. Mulcahey
2019-07-04 06:44:40 -04:00
committed by Martin Hjelmare
parent e824c553ca
commit 3c487928d4
12 changed files with 359 additions and 27 deletions

View File

@@ -8,7 +8,7 @@ from homeassistant.const import (
from homeassistant.core import callback
from homeassistant.components.device_tracker import SOURCE_TYPE_GPS
from homeassistant.components.device_tracker.config_entry import (
DeviceTrackerEntity
TrackerEntity
)
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.restore_state import RestoreEntity
@@ -52,7 +52,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
return True
class GeofencyEntity(DeviceTrackerEntity, RestoreEntity):
class GeofencyEntity(TrackerEntity, RestoreEntity):
"""Represent a tracked device."""
def __init__(self, device, gps=None, location_name=None, attributes=None):