Commit graph

444 commits

Author SHA1 Message Date
Paulus Schoutsen
6ac54b20c7 Add template distance helper 2016-02-20 21:58:53 -08:00
Paulus Schoutsen
6847dac582 Expose current time in templates
Fixes #1282
2016-02-20 20:58:01 -08:00
Paulus Schoutsen
1eae74be58 Add assumed_state to group 2016-02-20 19:11:02 -08:00
Paulus Schoutsen
443b39bccd MQTT Switch to expose assumed_state if optimistic 2016-02-20 17:17:30 -08:00
Paulus Schoutsen
8f70630790 MQTT Light to expose assumed_state if optimistic 2016-02-20 17:17:22 -08:00
Stefan Jonasson
6e7ca9505c Removed unused import 2016-02-20 22:25:41 +01:00
Stefan Jonasson
f3c95adaca Fixed now => utcnow
Fixed added time patch to unittest
2016-02-20 22:15:49 +01:00
Paulus Schoutsen
6532eae3d5 Merge pull request #1343 from balloob/random-cleanup
Random cleanup
2016-02-20 12:16:54 -08:00
Stefan Jonasson
ff6e071dff added the for param to the conditions as well 2016-02-20 12:52:42 +01:00
Paulus Schoutsen
cd6d44ece3 Properly clean up Home Assistant instances in tests 2016-02-20 01:05:52 -08: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
Paulus Schoutsen
1bfea626ff Handle circular setup dependency 2016-02-19 23:20:14 -08:00
Paulus Schoutsen
4c538c718b Clean up binary_sensor 2016-02-19 22:23:25 -08:00
MartinHjelmare
08aaea5444 Add mysensors binary sensor
* Add mysensors binary sensor.
* Add discovery platforms to binary_sensor base component.
* Replace device_state_attributes with state_attributes in
	binary_sensor base class.
* Fix docstrings.
* Add discovery of binary sensor to mysensors component.
* Add child.type as argument to mysensors device_class.
* Move binary sensor types from sensor to binary_sensor module.
* Fix binary_sensor attribute tests. Use state_attributes instead of
	device_state_attributes.
2016-02-20 04:28:17 +01: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
Paulus Schoutsen
1c8c16f85f Merge pull request #1220 from stefan-jonasson/command_line.py
New notification platform "command line"
2016-02-19 14:15:40 -08:00
Stefan Jonasson
fa6d9adcba Added some unittests for the command_line notification 2016-02-19 22:30:38 +01:00
Flyte
4e6b755b26 Add tests for TCP component. 2016-02-19 17:41:51 +00:00
pavoni
9e48b88154 Add for delay to state automation. 2016-02-19 15:28:17 +00: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
Dan Smith
d93883f153 Make nx584 expose zone types (sensor classes)
With this, plus https://github.com/balloob/home-assistant-polymer/pull/32,
I can have nx584 sensors use a proper icon in the UI.
2016-02-18 12:20:35 -08:00
Dan Smith
2d932f89fc Add sensor_class to binary_sensor
This adds a 'sensor_class' property and attribute, which should be either
None or one of several defined SENSOR_CLASSES to indicate contextual
information about what the sensor is measuring.
2016-02-18 12:20:35 -08:00
MartinHjelmare
6e8c79d531 Change refactor structure
* Make a flatter one level inheritance, with MySensorsLight as parent
	with four children, one per light type.
* Break out helper methods. One per plain light, dimmer and RGB/RGBW
	children and per update, turn_on and turn_off, nine in total. Put
	these in the parent.
* Call the helper methods as needed from the child methods update,
	turn_on and turn_off.
* Change name of MySensorsLightLight to MySensorsLightPlain.
* Fix module docstrings according to pep257.
* Change name of color util method from rgb_hex_to_list to
	rgb_hex_to_rgb_list.
* Add unit tests for rgb_hex_to_rgb_list.
2016-02-18 02:04:06 +01:00
Dan Smith
9aa4028718 Fix #1287 for honeywell US systems with no fan
This bumps the somecomfort requirement to 0.2.1 to pull in a change
that makes handling no-fan systems graceful. Adds a test that should
prove it gives us what we want.

If no fan, then fan is always idle and fanmode is None.
2016-02-17 08:16:02 -08:00
Dan Smith
22865e5d96 Add nx584 as a sensor platform
This allows you to get every door, window, smoke, etc zone from your security
panel into HA. This uses the live eventing feature of pynx584, which means you
get instantaneous signaling into HA when a door opens or something happens,
which is handy for automating lights on when doors open after dark, etc.

Requires update to pynx584 0.2
2016-02-16 20:24:32 -08:00
Paulus Schoutsen
cdc93ab670 Merge pull request #1262 from balloob/chore/tests-cleanup
More testing cleanup
2016-02-14 23:37:10 -08:00
Paulus Schoutsen
c287520432 MQTT Light test - switch order 2016-02-14 23:16:54 -08: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
Paulus Schoutsen
23b116803b Merge pull request #1261 from kk7ds/graphite-gaierror
Some graphite error handling improvements
2016-02-14 17:40:40 -08:00
Dan Smith
3610f40a6a Handle EVENT_STATE_CHANGED with no new_state in graphite
I noticed some events that came in with new_state=None. Make graphite
defensive about this.
2016-02-14 15:57:03 -08:00
Dan Smith
366595fd90 Catch socket.gaierror in graphite driver
If you specify a name that can't be looked up in DNS, socket.connect()
throws socket.gaierror. We should catch and log that situation properly.
2016-02-14 15:44:11 -08:00
Paulus Schoutsen
09ab3e95c0 Tests should all use test HA 2016-02-14 15:08:23 -08:00
Paulus Schoutsen
bade0e0d71 Make tests pass flake8 2016-02-14 13:07:21 -08:00
Paulus Schoutsen
dd2aec0a08 Restructure tests to ensure unique ports 2016-02-14 12:54:16 -08:00
Paulus Schoutsen
06de73ff80 Allow removing a state via API + remote StateMachine 2016-02-13 23:00:38 -08:00
Paulus Schoutsen
ada2fb4ec0 Fire event when we remove a state 2016-02-13 22:57:40 -08:00
Dan Smith
0fbd947426 Test Honeywell Round thermostat
This includes two changes to the round code:
 - Return True on setup success
 - Break out the default away temp into a constant
2016-02-14 01:05:18 +00:00
Dan Smith
5921e65d83 Allow specifying location and/or thermostat for Honeywell US
This lets you optionally only add thermostats by location or
specific device id, instead of all the thermostats in your
account. This would be helpful if you have two devices in different
houses (i.e vacation home), etc.
2016-02-13 23:13:38 +00:00
Dan Smith
c51dd64bd8 Convert Honeywell platform to use somecomfort library 2016-02-13 23:13:33 +00:00
Paulus Schoutsen
bf0b453677 Merge branch 'hotfix/state-as-number' into dev
Conflicts:
	homeassistant/const.py
	tests/helpers/test_state.py
2016-02-13 08:32:06 -08:00
Fabian Affolter
00afaac54c Update for file header, docstrings, and PEP8/PEP257 2016-02-13 14:19:11 +01:00
Paulus Schoutsen
1571b33e4a Fix: state_as_number always return float 2016-02-13 00:08:32 -08:00
Dan Smith
61e2da8827 Add tests for influxdb and fix a bug
This adds tests for the influxdb component. It also fixes a bug,
where username and password are required, but not gracefully
handled if they're missing from config.
2016-02-12 05:34:13 +00:00
Dan Smith
484b7b64d7 Re-allow splunk to report string states
Splunk *can* take string states, so un-fix that wrong fix.
2016-02-12 02:20:15 +00:00
Paulus Schoutsen
7241762bcc Merge pull request #1209 from kk7ds/abstract-numeric-state
Abstract numeric state
2016-02-11 18:16:57 -08:00
Dan Smith
0a904acd4d Add some tests for splunk
This also fixes issue #1214, and I think another bug. The splunk
code will just take the value of state.state and try to serialize
it to json if it can't make it into a number. It did this before
I generalized that code. Since json.dumps() will fail on most anything
complicated, I think the right thing to do is *not* try to do that.
2016-02-12 01:45:30 +00:00
Dan Smith
76df759f4c Add simple statsd tests
These are not very amazing, but at least exercise the code a little
to make sure I didn't break anything. Hopefully they're useful in the
future too.
2016-02-12 01:45:30 +00:00
Dan Smith
4a2b956493 Convert statsd, influx, splunk, and graphite to use state_as_number()
Fixes #1205
2016-02-12 01:45:25 +00:00