Commit graph

461 commits

Author SHA1 Message Date
Matthew Treinish
94acda2a31 Add AC mode to heat_control component ()
This commit adds a new option to the heat_control component, ac_mode.
When set to true, this treats the toggle device as a cooler instead
of a heater. The concept being if you have a window or in-wall ac
unit that doesn't have a built-in thermostat having the home assistant
implemented thermostat would be as useful as for space heaters.
2016-08-02 21:56:08 -07:00
Assaf Inbal
bb22ad3064 Proxy requests to the media player's media image ()
This is needed when the media server and UI client are not on the same network.
2016-08-02 18:31:15 -07:00
HBDK
a73c2e57a8 Added mired and kelvin mode to flux ()
* Added mired and kelvin mode to flux

* changed as requested

* Renamed varible

* attempt to add test for new method in flux.py

* removed line to fix lint error
2016-07-31 16:55:48 -07:00
Teagan Glenn
122581da7f Proximity unit of measure ()
* Allow multiple proximities

* Distance conversion

* Add unit of measurement and conversion to proximity

* Shorten attribute name

* Fix get unit of measurement

* Fix the km <-> m conversion

* Add type check and errors

* first path unit test around distance utility

* Fix numeric type check

* Fix conversion type-os

* Actually set the exception thrown flag

* Test for exact conversion

* More descriptive variable names

* Update method invocation to match change in method name

* Missed a couple variables

* Line continuation

* Fix linting too many return issue

* Break out proximity setup for list of proximity and for single proximity device

* Pass hass to setup function

* Check if setup succeeded for each proximity component

* Change variable name

* Break out branches in convert to avoid too many branches linting error

* Remove disable lint line

* Variables for default properties

* Combine logic

* Test loading multiple proximities for 100% code coverage on proximity component

* Unit test to reach 100%
Fail to configure proximities missing devices

* Fail first before processing

* Combine return statements

* lstrip = bad Teagan

* Utilize string formating instead of concatenation

* Fix variable reference

* Typeo

* Clean up conversion to reduce complexity

* Update unit tests to match code changes on distance util

* Test non numeric value

* Private methods, value type has already been checked.
2016-07-31 10:20:56 -07:00
Scott O'Neil
822a263622 Fixing PEP257 issues in () 2016-07-30 10:30:13 +02:00
Scott O'Neil
bf3c0472bb Adding tests for sonos registration () 2016-07-28 20:40:58 -07:00
Adam Garcia
6a3c5b093b Update to group component to properly handle zone changes in tracked devices ()
* pep8 fixes for group and test

* update to pass linting

* docstring fix.

* reduced length of docstring on test.
2016-07-28 20:40:25 -07:00
Johann Kellerman
8c728d1b4e Update icloud device_tracker ()
*  slugify() for dev_id (fixes ) [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
f1632496f0 Allow circular dependency with discovery () 2016-07-25 22:49:10 -07:00
Paulus Schoutsen
78c298e563 Fix test to test Norway fix () 2016-07-25 22:02:12 -07:00
Johann Kellerman
4cf618334c Update recorder. ()
* Update recorder.

models.py:
 - Use scoped_session in models.py to fix shutdown error
__init__.py:
 - Session _commit & retry method
 - Single session var for purge_data
 - Ensure single _INSTANCE
 - repeat purge every 2 days
 - show correct time in log_error

* _commit

* Restore models to old functionality, swap purge, remove _INSTANCE cleanup from tests, typing ignore Base class

* pylint

* Remove recorder from model unit test
2016-07-23 11:25:17 -07:00
Nicolas Graziano
d202929de5 Float value for input slider ()
* Allow input_slider value to be a float number.

* Change input_slider unit test to allow float number.
2016-07-23 09:53:16 -07:00
Daniel Høyer Iversen
d64dae8fcf Rfxtrx sensor ()
* fire event rfxtrx sensor

* Add fire_event to rfxtrx sensor config

* Add test for rfxtrx fire event in sensor
2016-07-19 19:15:50 -07:00
Daniel
98550b5465 rfxtrx light tests 2016-07-17 11:14:29 +02:00
Daniel
034f1b9499 rfxtrx switch tests 2016-07-17 10:27:27 +02:00
Daniel
c79cd905fe rfxtrx sensor tests 2016-07-17 10:24:08 +02:00
Daniel
294883a174 rfxtrx core tests 2016-07-17 10:20:24 +02:00
Paulus Schoutsen
38c50c830f Fix linting errors 2016-07-16 23:45:38 -07:00
Paulus Schoutsen
fd5aad1ee7 Add panel_iframe component 2016-07-16 23:21:34 -07:00
Paulus Schoutsen
22b4aebeb3 Add support for dynamic frontend panels 2016-07-16 23:21:34 -07:00
Pascal Vizeli
6694f29918 add media_player/clear_playlist and line-in/tv support to sonos ()
* add media_player/clear_playlist and line-in/tv support to sonos

* add support source radio

* fix bug

* print TV/Line-In as media_title

* implement universal player

* add to demo platform

* Update demo.py

Better handling for demo object

* add unit tests

* fix unit test
2016-07-15 09:00:41 -07:00
Paulus Schoutsen
ef64e11b50 known devices yaml robustness () 2016-07-13 23:56:02 -07:00
Daniel Høyer Iversen
16feb1c55e Fix issue for rfxtrx ()
* Fix issue  for rfxtrx

* update tests for rfxtrx sensor

* Replace state_unkown with None in rfxtrx sensor

* Update test_rfxtrx.py
2016-07-13 07:46:11 -07:00
rhooper
beeae17cab Merge pull request from home-assistant/recorder-tests
Add more recorder tests
2016-07-12 11:48:22 -07:00
Daniel Høyer Iversen
09a4336bc5 Fix bug in rfxtrx for int device id () 2016-07-12 01:45:22 -07:00
Paulus Schoutsen
e0dd5a8558 Tweak Recorder 2016-07-11 08:56:07 -07:00
Brent
ff5c3c9f98 Added attributes to the statsd data ()
* Added attributes to the statsd data

* Updated to allow optional attribute logging
2016-07-07 23:09:02 -07:00
Jordan Keith
83a72ab4dc Update unifi.py to support sites ()
* 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
Brent
ffccca1f60 Updated to new statsd library and added state change counters () 2016-07-03 15:21:18 -07:00
rhooper
a2e45b8fdd Switch to SQLAlchemy for the Recorder component. Gives the ability t… ()
* Switch to SQLAlchemy for the Recorder component.  Gives the ability to use MySQL or other.

* fixes for failed lint

* add conversion script

* code review fixes and refactor to use to_native() model methods and execute() helper

* move script to homeassistant.scripts module

* style fixes my tox lint/flake8 missed

* move exclusion up
2016-07-02 11:22:51 -07:00
Paulus Schoutsen
d1f4901d53 Migrate to cherrypy wsgi from eventlet () 2016-06-30 09:02:12 -07:00
Paulus Schoutsen
6714392e9c Move elevation to core config and clean up HTTP mocking in tests ()
* Stick version numbers

* Move elevation to core config

* Migrate forecast test to requests-mock

* Migrate YR tests to requests-mock

* Add requests_mock to requirements_test.txt

* Move conf code from bootstrap to config

* More config fixes

* Fix some more issues

* Add test for set config and failing auto detect
2016-06-27 09:02:45 -07:00
Philip Lundrigan
d13cc227cc Push State ()
* Add ability to push state changes

* Add tests for push state changes

* Fix style issues

* Use better name to force an update
2016-06-26 00:33:23 -07:00
Paulus Schoutsen
206e7d7a67 Extend persistent notification support () 2016-06-25 16:40:33 -07:00
Matthew Treinish
1c1d18053b Add cmus media device ()
This commit adds support for the cmus console music player as a media
device.
2016-06-25 00:06:36 -07:00
Matthew Treinish
aa3d0e1047 Fix incorrect check on presence of password and pub_key ()
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 
2016-06-22 17:01:39 -07:00
Paulus Schoutsen
a70f922a71 ps - add reload core config service () 2016-06-22 09:13:18 -07:00
Paulus Schoutsen
a564fe8286 Fix error log () 2016-06-21 22:26:40 -07:00
Nick Touran
2882f05f2c Added template rendering to shell_command component ()
* Added template rendering to `shell_command` component

* Security upgrades to template rendering in shell_command.

* Added new unit tests for shell_command templates.
Better failure when template is invalid in shell_command
2016-06-18 09:57:18 -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 () 2016-06-14 22:41:49 -07:00
Edward Romano
8e839be938 Refactor Forecast.io ()
* Refactor Forecast.io

* Some more refactoring and code review workoff

* Dict switch refactor

* CamelCase for data lookup

* Fixing unit_of_measure update

* Better default return for unit_of_measurement

* Test fix
2016-06-13 18:54:49 -07:00
Matthew Treinish
1381984b77 Add ssh public key support to the asuswrt component ()
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
Jesse Zoldak
16f4695a13 Add tests for forecast.io ()
* Add tests for forecast.io

* Fix linting items and don't call a platform a component
2016-06-12 17:22:58 -07:00
Paulus Schoutsen
71eb09ee5e Fix configurator tests 2016-06-10 20:50:04 -07:00
Paulus Schoutsen
0525af920c Update betamax casettes 2016-06-08 21:06:14 -07:00
John Arild Berentsen
202a8dba8e Hvac fix ()
* Zwave hvac fix

* Zwave hvac fix and move max min temp to base

* Tests
2016-06-07 08:43:46 -07:00
Dan Smith
49de55e75b Add support for UniFi Video >= 3.2.0
Unfortunately, Ubiquiti changed their (supposedly versioned) API in
3.2.0 which causes us to have to refer to cameras by id instead of
UUID. The firmware for 3.2.x also changed the on-camera login procedures
and snapshot functionality significantly.

This bumps the requirement for uvcclient to 0.9.0, which supports the
newer API and makes the tweaks necessary to interact properly.
2016-06-06 20:28:52 -07:00
Jacob Tomlinson
ca7415e935 Added rfxtrx rollershutter ()
* Added rfxtrx rollershutter

* Updated mock command with real one

* Corrected test string
2016-06-02 00:39:58 -07:00
Nolan Gilley
24d2eaa6ca flux platform as a switch ()
* flux platform as a switch

* use track_time_change. broken :(

* use track_utc_time_change instead of track_time_change

* add some basic tests

* use brightness from RGB_to_xy

* config_schema validation

* back to platform schema. what was i doing?

* more broken tests :(

* 644

* fix some time bugs

* add working tests. config validation still not right

* bug fixes and more test cases.
2016-06-01 23:38:19 -07:00