Commit graph

69 commits

Author SHA1 Message Date
Johann Kellerman
7b40a641ec Continue on invalid platforms and new setup_component unit tests (#3736) 2016-10-08 11:27:35 -07:00
Johann Kellerman
fb94aaa5a1 Load yaml using validator and include consider_home (#3743)
* Load yaml using validator, consider_home

* timedelta, track_if_away

* improve voluptuous

* Add default back

* Change time_period validation order
2016-10-07 18:08:33 -07:00
Fabian Affolter
12f1be9b1c Fix PEP257 issues and ordering (#3720) 2016-10-05 17:32:29 -07:00
Erik Eriksson
287a7e2720 Support for encrypted payload (#3587) 2016-10-04 00:57:37 -07:00
Paulus Schoutsen
4076ccf639 Use setup_component in tests (#3414)
* Alarm Control Panel Manual - use setup_component

* Update automation - zone tests

* Update climate - demo tests

* Update climate - generic thermostat tests

* Update cover - command line tests

* Update cover - demo tests

* Update device tracker tests

* Update device tracker - owntracks tests

* Update fan - demo tests

* Update garage door - demo tests

* Update light tests

* Update lock - demo tests

* Update media player - demo tests

* Update notify - command line tests

* Update notify - demo tests

* Update notify - file tests

* Update notify - group tests

* Update sensor - mfi tests

* Update sensor - moldindicator tests

* Update sensor - mqtt room tests

* Update switch - command line

* Update switch - flux

* Update switch tests

* Update scene tests

* Fix wrong default port for mfi switch
2016-09-17 10:29:58 -07:00
Teagan Glenn
8189ec2c8d Automatic polling (#3360)
* Test updating automatic

* Scan interval

* Schedule scan every time delta

* Pass around has

* Recursive issue

* Method invocation

* Oops

* Set up poll

* Default argument value

* Unused import

* Semicolon

* Fix tests

* Linting

* Unneeded throttle as it's handled by time event

* Use track time change event listener

* Disable lint rule

* Attribute removed - removing test

* Debug instead of info

* Unused import
2016-09-12 19:59:34 -07:00
Paulus Schoutsen
609d7ebea5 Migrate core from threads to async awesomeness (#3248)
* Add event loop to the core

* Add block_till_done to HA core object

* Fix some tests

* Linting core

* Fix statemachine tests

* Core test fixes

* fix block_till_done to wait for loop and queue to empty

* fix test_core for passing, and correct start/stop/block_till_done

* Fix remote tests

* Fix tests: block_till_done

* Fix linting

* Fix more tests

* Fix final linting

* Fix remote test

* remove unnecessary import

* reduce sleep to avoid slowing down the tests excessively

* fix remaining tests to wait for non-threadsafe operations

* Add async_ doc strings for event loop / coroutine info

* Fix command line test to block for the right timeout

* Fix py3.4.2 loop var access

* Fix SERVICE_CALL_LIMIT being in effect for other tests

* Fix lint errors

* Fix lint error with proper placement

* Fix slave start to not start a timer

* Add asyncio compatible listeners.

* Increase min Python version to 3.4.2

* Move async backports to util

* Add backported async tests

* Fix linting

* Simplify Python version check

* Fix lint

* Remove unneeded try/except and queue listener appproriately.

* Fix tuple vs. list unorderable error on version compare.

* Fix version tests
2016-09-12 19:16:14 -07:00
Johann Kellerman
22362727e4 Use voluptuous for Unifi, Ubus (#3125) 2016-09-04 10:06:16 +02:00
Johann Kellerman
91a3522100 Improve voluptuous and login errors for Asus device tracker (#3170) 2016-09-03 17:32:43 -06:00
Teagan Glenn
601395bc12 Automatic ODB device tracker & device tracker attributes (#3035) 2016-09-03 18:38:17 +02:00
Greg Dowling
0943cc78cd Merge pull request #2973 from nma83/owntracks-waypoint-import
Owntracks waypoint import
2016-08-31 15:25:49 +01:00
Robbie Trencheny
e9354bb1e8 Make pep8 happy 2016-08-30 13:58:53 -07:00
Johann Kellerman
55d305359e Device tracker component & platform validation. No more home_range. (#2908)
* Device tracker component & platform validation. No more home_range.

* Mock, bluetooth

* Renamed _CONFIG_SCHEMA. Raise warning for #1606

* test duplicates

* Fix assert

* Coverage

* Typing

* T fixes
2016-08-30 10:22:52 -06:00
NMA
70fe7f747a * Improved zone naming in waypoint import
* Added more test coverage for owntracks and zone
2016-08-28 13:18:30 +05:30
Johann Kellerman
6f1c97b9d3 Voluptuous for AsusWRT (#2998)
* Voluptuous for AsusWRT
2016-08-27 22:30:06 +02:00
NMA
2430acf3ad Added unit test to enhance waypoint_whitelist coverage 2016-08-26 22:00:48 +05:30
NMA
5a25c74276 Refactored zone creation based on code review feedback, enhanced configuration 2016-08-26 19:52:08 +05:30
NMA
185ae50e24 Rebased to upstream 2016-08-25 17:02:45 +05:30
NMA
e6b7511e7d Added test for Owntracks waypoints import 2016-08-25 16:52:22 +05:30
NMA
2bea5a484f Added test for Owntracks waypoints import 2016-08-25 16:47:34 +05:30
Paulus Schoutsen
21fb18e5aa pep257 fixes 2016-08-23 20:25:52 -07:00
Dan Ford
2b4980ae5d Add tplink Archer C7 device tracking support for 5Ghz networks 2016-08-21 13:09:44 -07:00
Robbie Trencheny
37561765ff Add Gravatar support to device_tracker (#2836)
* Support passing an email address linked to Gravatar as the picture in known_devices.

* Add a dedicated field for Gravatar

* Bring tests back up to where they were before Gravatar.

* Add tests for Gravatar.
2016-08-16 21:08:57 -07:00
pavoni
a7703f27d8 Add missed docstring. 2016-08-15 13:14:07 +01:00
pavoni
c0b1ff0eaf Handle accuracy zero correctly in enter/leave events. 2016-08-15 13:08:30 +01:00
Johann Kellerman
8c728d1b4e Update icloud device_tracker (#2614)
*  slugify() for dev_id (fixes #2162) [Keep space replacement to not impact known_devices.yaml]
*  pyicloud upgrade 0.9.1
*  config validation
*  Only poll icloud every 4 minutes...
*  Immediately pull device state on HASS start
*  Added new test with icloud char e' acute [chr(233)]
* Suppress pyicloud logging
2016-07-26 23:53:31 +02:00
Paulus Schoutsen
ef64e11b50 known devices yaml robustness (#2523) 2016-07-13 23:56:02 -07:00
Jordan Keith
83a72ab4dc Update unifi.py to support sites (#2434)
* Update unifi.py

Add support for a site that is not the default within the Unifi Controller.

i.e. A controller with multiple sites:

 - Home
 - Friends
 - Parents (default)

Supplying the identifier for 'Home' now means that the devices tracked will be associated with 'Home'.

* Update test_unifi.py

Fix test modules as well.
2016-07-04 08:20:00 -07:00
Paulus Schoutsen
d1f4901d53 Migrate to cherrypy wsgi from eventlet (#2387) 2016-06-30 09:02:12 -07:00
Matthew Treinish
aa3d0e1047 Fix incorrect check on presence of password and pub_key (#2355)
This commit fixes an issue with the use of None in default values
for the config get() calls in __init__() of AsusWrtDeviceScanner.
These values are cast as strings and when a NoneType is cast it
returns the string "None" this broke the check for the existence
of these fields. This commit fixes the issue by changing the default
value to be an empty string '' which will conform with the behavior
expected by the ssh login code.

Closes #2343
2016-06-22 17:01:39 -07:00
Paulus Schoutsen
29343ad651 Fix pep257 bt home hub 5 test 2016-06-18 08:20:14 -07:00
Lewis Juggins
7b8b78ec0e BT Home Hub 5 device tracker support (#2250) 2016-06-14 22:41:49 -07:00
Matthew Treinish
1381984b77 Add ssh public key support to the asuswrt component (#2287)
The pexpect.pxssh module has support for using public key
authentication. [1] This commit adds support for leveraging that and
establishing a ssh connection with a public key instead of a password.

[1] http://pexpect.readthedocs.io/en/stable/api/pxssh.html#pexpect.pxssh.pxssh.login
2016-06-12 21:27:41 -07:00
Paulus Schoutsen
1798df7686 Handle invalid dev ids for dev tracker + owntracks (#2174) 2016-05-26 21:49:44 -07:00
Paulus Schoutsen
15e329a588 Tons of fixes - WIP 2016-05-21 15:01:33 -07:00
pavoni
8ff9506138 Ignore acc: 0 updates. 2016-05-19 16:16:43 +01:00
pavoni
dd1703469e Handle region enter/leave with spaces. 2016-05-19 16:04:55 +01:00
Paulus Schoutsen
b87e2437aa Prevent device tracker from creating invalid YAML (#1774) 2016-04-09 13:38:51 -07:00
Jan Harkes
88da42fe62 Config validation for MQTT device_tracker platform. 2016-04-06 22:51:38 -04:00
pavoni
fc455a1047 Allow entry into passive zones. 2016-03-13 18:01:29 +00:00
Fabian Affolter
9838697d2b Fix PEP257 issues 2016-03-09 10:25:50 +01:00
Paulus Schoutsen
cd30f2de0d Device Sun Light Trigger: Clean up 2016-03-05 20:15:33 -08:00
Paulus Schoutsen
fb46eff5f8 Device tracker: remove support for old config 2016-03-05 11:43:23 -08:00
Hydreliox
c04555d7b1 Add GPS accuracy check for a location update or an event update
Add tests related to this
Great thanks to @pavoni for his support on this fix
2016-03-04 20:19:50 +01:00
Paulus Schoutsen
22b47ce9c6 Merge pull request #1314 from balloob/fix_own_tracks_mobile_beacon
Fix own tracks mobile beacon race condition
2016-02-20 00:27:07 -08:00
Dan Smith
27f456ca70 Add Ubiquiti Unifi device tracker
Ubiquiti's Unifi WAP infrastructure has a central controller (like mfi and uvc)
that can be queried for client status. This adds a device_tracker module that
can report the state of any client connected to the controller.
2016-02-19 15:24:00 -08:00
pavoni
ee62120fe5 Revise race condition test. 2016-02-19 10:19:14 +00:00
pavoni
7bd4e58b9d Add tests for race condition. 2016-02-19 09:43:59 +00:00
Paulus Schoutsen
68803a46b6 Thread pool tweaks 2016-02-14 23:01:49 -08:00
Paulus Schoutsen
8d366a7367 Tests: Mock get_local_ip by default too 2016-02-14 22:01:30 -08:00