Commit graph

752 commits

Author SHA1 Message Date
Paulus Schoutsen
da8994e4b5 Migrate camera.uvc to voluptuous (#3440) 2016-09-18 14:22:32 -07:00
Daniel Høyer Iversen
11c07440fe Accept login from approved ips without password (#3427) 2016-09-18 10:20:19 -07:00
Pascal Vizeli
de4cc5034e Add toggle service to input_boolean (#3432) 2016-09-18 10:18:44 -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
Paulus Schoutsen
c23ad3e285 Fix zones (#3413) 2016-09-15 19:40:18 -07:00
Fabian Affolter
ac5647a30e Use voluptuous for statsd (#2928)
* Migrate to voluptuous

* Update tests
2016-09-13 18:22:30 -07:00
Johann Kellerman
afc527ea55 Fix tests (#3387) 2016-09-13 18:17:51 -07:00
Pascal Vizeli
1697a8c774 SleepIQ component with sensor and binary sensor platforms (#3390)
Original from #2949
2016-09-14 00:11:50 +02: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
Paulus Schoutsen
838b09bb8f Bugfix group order (#3323)
* Add ordered dict config validator

* Have group component use ordered dict config validator

* Improve config_validation testing

* update doc string config_validation.ordered_dict

* validate full dict entries

* Further simplify ordered_dict validator.

* Lint fix
2016-09-11 22:25:01 -07:00
Fabian Affolter
78313c793c Migrate to voluptuous (#3298) 2016-09-11 09:21:16 +02:00
Lewis Juggins
de150ecbc9 Hotfix for #3100 (#3302) 2016-09-10 07:36:55 -07:00
John Arild Berentsen
ba28208106 Added stuff for support range setting (#3189) 2016-09-09 11:06:53 -06:00
Lewis Juggins
44f5a66b66 Add additional template for custom date formats (#3262)
I can live with a few visual line breaks 🐬
2016-09-08 18:49:02 -06:00
Johann Kellerman
e8ad76c816 Improve yaml fault tolerance and handle check_config border cases (#3159) 2016-09-08 22:20:38 +02:00
Pascal Vizeli
267cda447e Add support for complex template structures to data_template (#3255) 2016-09-08 18:19:47 +02:00
Paulus Schoutsen
5995f2438e fix remove listener (#3196) 2016-09-07 06:59:59 -07:00
Paulus Schoutsen
35b388edce Reload groups (#3203)
* Allow reloading groups without restart

* Test to make sure automation listeners are removed.

* Remove unused imports for group tests

* Simplify group config validation

* Add prepare_reload function to entity component

* Migrate group to use entity_component.prepare_reload

* Migrate automation to use entity_component.prepare_reload

* Clean up group.get_entity_ids

* Use cv.boolean for group config validation
2016-09-07 06:59:16 -07:00
Dan Smith
f55095df83 Fix mFi sensors in uninitialized state (#3246)
If mFi sensors are identified but not fully assigned they can
have no tag value, and mficlient throws a ValueError to signal this.
This patch handles that case by considering such devices to always
be STATE_OFF.
2016-09-06 18:04:20 -07:00
Greg Dowling
09d52820dd Simple trend sensor. (#3073)
* First cut of trend sensor.

* Tidy.
2016-09-05 16:32:14 +02:00
Paulus Schoutsen
e9813b219e Allow reloading automation without restarting HA (#3002) 2016-09-04 17:15:52 +02:00
Johann Kellerman
22362727e4 Use voluptuous for Unifi, Ubus (#3125) 2016-09-04 10:06:16 +02:00
Fabian Affolter
3c615e2319 Use voluptuous for mFi switch (#3168)
* Migrate to voluptuous

* Take change configuration into account
2016-09-03 20:32:35 -06:00
Fabian Affolter
8467d07a3d Migrate to voluptuous (#3171) 2016-09-03 20:24:29 -06: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
Teagan Glenn
6fdd7f5350 Back out insteon hub and fan changes (#3062) 2016-09-02 12:18:32 -07:00
Fabian Affolter
3bbcf4d8b1 Migrate to voluptuous (#3142)
🐬
2016-09-02 11:16:42 -06:00
Fabian Affolter
40c71b5d96 Use voluptuous for Command line platforms (#2968)
* Migrate to voluptuous

* Fix pylint issues

* Remove FIXME

* Split setup test

* Test with bootstrap

* Remove lon and lat

* Fix pylint issues
2016-09-02 08:09:09 -06:00
Fabian Affolter
95cc672161 Add missing docstrings (fix PEP257 issues) (#3098)
* Add missing docstrings (fix PEP257 issues)

* Finish sentence
2016-09-02 14:25:13 +02:00
Lewis Juggins
0bcfb65a30 Refactor notification titles to allow for them to be None, this also includes a change in Telegram to only include the title if it's present, and to use a Markdown parse mode for messages (#3100) 2016-09-01 14:35:46 +01:00
Pascal Vizeli
5036bb0bc6 improve isfile validation check (#3101) 2016-09-01 14:35:00 +01:00
Paulus Schoutsen
87e332c777 Merge pull request #2980 from home-assistant/automation-entities
Create entities for automation
2016-09-01 09:50:39 +01:00
Pascal Vizeli
705b3571f4 Use voluptuous for file (#3049) 2016-08-31 18:12:34 +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
John Arild Berentsen
17a57d3b47 Fixes wrong statevalue and problem with zwave setpoint (#3017)
* Fixes wrong statevalue and problem with zwave setpoint

* Fix demo test to match bugfix (#10)
2016-08-28 17:58:50 +02: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
Teagan Glenn
fdb6de4d23 Fan demo (#2976)
* Update attr to property and default state method

* State prop is defined in parent class

* Demo platform fan

* PyDoc

* Copy-pasta artifact

* PyDoc

* Linting

* Raise error if turn_off and turn_on not implemented

* Update demo platform

* Initial unit test commit

* Readability

* Unneeded typing

* Should inherit from fan entity

* Turn off polling

* Initial oscillating flag

* Pass HASS into demo

* Typing

* Invoke set_speed instead of setting directly

* Service update

* Update demo tests

* Forgot to block after service call.

* linting

* Test to make sure not implemented is thrown

* Is On Method test

* Update const to match string

* Update services yaml

* Toggle method

* Toggle service

* Typing

* TYPE O

* Attribute check

* Type-o

* Type-o

* Put typing back

* ToggleEntity

* Linting

* Linting

* Oops

* Stale prints

* Demo support
2016-08-27 14:53:12 -06:00
Johann Kellerman
6f1c97b9d3 Voluptuous for AsusWRT (#2998)
* Voluptuous for AsusWRT
2016-08-27 22:30:06 +02:00
Matthew Bowen
c05d27d214 Completely local control of entities via Alexa (#2942)
* Initial code for alexa_local_control.

* Added support for creating a dummy username.

* Move SSDP responses to local variables.

* Added config validation via Voluptuous.

* Modify and remove unnecessary returned emulated bridge values.

* Remove script and scene domains from default exposed domains.

* Replaced Flask with HomeAssistantWSGI.

* Fix lint errors.

* Correcting grammar and spelling in docs and comments.

* Rename alexa_local_control to emulated_hue.

* Rename emulated_hue attributes.

* Fix a bug where something marked not exposed is exposed by default.

* Make sure the UPNP responder thread cleanly stops when HASS stops.

Also fix some config loading and lint errors.

* Fixed unexposed entities still having individual state exposed.

* Started writing tests for emulated_hue.

* Fix being able to set state of non-exposed entity.

* Another test for emulated_hue.

* More tests for emulated_hue.

Also slightly simplified emulated_hue's PUT handler.

* Fix bad test, sorry :/

* Third time's the charm.

* Fix lint and value validation tests.

* Rename emulated_hue bridge name.

* Remove license and documentation from header.

* Combine two if statements.

* Style changes.

* Fixed various issues and added some constants
2016-08-27 01:23:40 -07:00
Paulus Schoutsen
7f27cc5468 Fix tests docstring 2016-08-27 07:45:46 +01: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
Paulus Schoutsen
3fa1963345 Convert automation to entities with services 2016-08-25 23:36:48 -07:00
Paulus Schoutsen
d9ecc4af64 EventBus: return function to unlisten 2016-08-25 23:25:35 -07:00
Paulus Schoutsen
62ba0fa7a2 Do not install pip packages in tests 2016-08-25 23:23:14 -07:00
Landrash
34f57ebdc9 Fix reference to wrong components in tests for cameras (#1) (#2975)
🐬 👍
2016-08-25 10:55:37 -06:00