Add MVP person component (#20290)

* Add person component

* Required first name.
* Optional last name and user id.
* Optionally track device trackers. Last device tracker state change will
  set state.
* Set device tracker state entity_id as source attribute.
* Set coordinates of device tracker state as state attributes.
* Restore state.

* Parse restored state too

* Clean up

* Add missing property decorator

* Validate source entities as device trackers

* Only use name instead of first and last name

* Add user_id validation

* Add unique_id

* Remove not needed properties

* Uniform docstrings

* Fail component setup if no valid entities

* Add tests

* Add id and use that for unique_id

* Clean up
This commit is contained in:
Martin Hjelmare authored and Paulus Schoutsen committed 2019-02-07 15:25:30 -08:00
1 parent 32f2221b22
commit 5f76628665
3 files changed
+332

No files matched your search

+1
View File
@@ -0,0 +1 @@
"""The tests for the person component."""