2893 Commits

Author SHA1 Message Date
Paulus Schoutsen
90e17fc77f Add tests for entity component 2016-01-31 01:01:23 -08:00
magnusknutas
ca070a36e3 Dont wrap '/int' parameters with tuple 2016-01-26 21:38:07 +01:00
magnusknutas
33b0f4d05d Fixes bug in time trigger and adds test for ex. /two 2016-01-26 20:43:29 +01:00
magnusknutas
ebd475b380 Unused import was the problem 2016-01-26 18:50:25 +01:00
magnusknutas
726637b867 New and improved handling of the matching! Kudos to @balloob 2016-01-26 18:37:19 +01:00
magnusknutas
ec5d88b98e hourly periodic task 2016-01-26 17:06:50 +01:00
magnusknutas
13fbefcdf8 Running periodic tasks 2016-01-26 10:28:31 +01:00
Ryan Kraus
8406f81811 Removed decorator callback
The decorator callback was not actually necessary so it was removed and
replaced with a partial function instead.
2016-01-25 00:14:16 -05:00
Ryan Kraus
bcdfc555e0 Removed service decorator from event decorators 2016-01-24 23:09:09 -05:00
Ryan Kraus
3b89102338 Fixed lint issue from merge
extract_entity_ids from the service helpers was overwriting the service
decorator with one of its attributes. This was fixed.
2016-01-24 23:00:43 -05:00
Ryan Kraus
60dd2d441d Merge remote-tracking branch 'balloob/dev' into automation-decorator
# Conflicts:
#	homeassistant/helpers/service.py
#	tests/helpers/test_service.py
2016-01-24 22:51:00 -05:00
Ryan Kraus
5830da63b1 Moved service decorator to service helpers
Moved the service decorator to the service helpers module and moved the
associated tests.
2016-01-24 22:46:30 -05:00
Ryan Kraus
54b82ecd91 Lint fixes and additions to event decorators
1. service decorator was overwriting the function name with one of its
arguments.
2. Accidentally left an extra argument in track_sunrise.
3. Added track_utc_time_change decorator.
2016-01-24 21:06:15 -05:00
Ryan Kraus
57725136c0 Many updates regarding event decorators
1. Added HASS to the arguments for callbacks that are created with
event decorators.
2. Added a service decorator.
3. Updated example.py in the example config to use the event decorators.
2016-01-24 19:52:22 -05:00
Ryan Kraus
40dbeb0b60 Another revision on event decorators
This revision of event decorators removes much of the complexity. The
decorated functions are no longer wrapped with a class that tracks
last_run, etc. Bootstrap now gives hass to the event_decorators module
before initializing components so the decorators no longer require
activation.
2016-01-24 17:46:05 -05:00
Ryan Kraus
ef92940ffb A few lint fixes to event decorators. 2016-01-24 16:45:35 -05:00
Ryan Kraus
02e634c6a2 Fixed bugs to allow HA to boot again
1) helpers/event should not import the sun component unless it is
requested. This prevents circular import.
2) fixed import typo in bootstrap
2) bootstrap cannot import event_decorators until it is needed because
this leads to a circular import.
2016-01-24 15:55:47 -05:00
Ryan Kraus
0f937cad74 Initial pass at event decorators
Created event decorators for custom components. Decorators were created
for the events: track_state_change, track_sunrise, track_sunset, and
track_time_change.
2016-01-24 15:28:09 -05:00
Ryan Kraus
81dd1515ae Moved sunrise/sunset tracking to helpers
The automation component contained some very handy and generic
functions for tracking sunset and sunrise. This was moved to
helpers/event.py.
2016-01-24 15:07:09 -05:00
Paulus Schoutsen
53484e46a3 Move generate_entity_id to entity helpers 2016-01-23 23:00:46 -08:00
Paulus Schoutsen
de79a46d43 Move extract_entity_id to service helpers 2016-01-23 22:57:14 -08:00
Paulus Schoutsen
bc19ef66bf Move split_entity_id to helpers 2016-01-23 22:49:49 -08:00
Paulus Schoutsen
de08f0afaa Load YAML config into an ordered dict 2016-01-23 22:41:01 -08:00
Ryan Kraus
027d97321f Merge pull request #911 from rmkraus/service-toggle
Added toggle service
2016-01-17 21:11:35 -05:00
Paulus Schoutsen
a9c6f8c1d9 Enforce entity attribute types 2016-01-17 17:50:20 -08:00
Ryan Kraus
85aa4fdd2e Revised entity toggle to use is_on
The toggle function in the Entity ABC was using state == STATE_ON to
determine whether the entity was on. This was revised to use the is_on
property instead.
2016-01-17 16:59:22 -05:00
Ryan Kraus
342a819fd4 Added toggle service
Added a toggle service to the homeassistant, light, switch, and
media_player domains.
2016-01-16 10:45:05 -05:00
Paulus Schoutsen
73cdf00512 More service helper tests 2016-01-09 16:01:27 -08:00
Paulus Schoutsen
12b5caed70 ps - strip entity IDs in service call 2016-01-09 15:51:51 -08:00
Paulus Schoutsen
825c91f0c3 Add calling service functionality to Alexa 2016-01-08 18:54:28 -08:00
Paulus Schoutsen
8983a97c70 Fix calling turn_on for groups with mixed content 2016-01-03 21:25:15 -08:00
Paulus Schoutsen
736183e6f5 Fix bug in reproduce_state with complex state attributes 2016-01-03 11:27:30 -08:00
Paulus Schoutsen
f8b2570cb3 Group entities when reproducing a state 2016-01-03 02:32:09 -08:00
Paulus Schoutsen
561a78bef3 Fix EntityComponent deadlock 2015-12-22 02:19:55 -08:00
Paulus Schoutsen
a301d869d7 PyLint 1.5 fixes 2015-11-29 13:49:05 -08:00
Paulus Schoutsen
99aa4307ef Add locks to entity component 2015-11-28 15:55:01 -08:00
Paulus Schoutsen
4d069323f4 Add icon support to entity 2015-11-03 00:20:48 -08:00
Paulus Schoutsen
12495c717e Fix script regression 2015-10-28 12:24:33 -07:00
Paulus Schoutsen
3d972abdab Clean up the heat control thermostat 2015-10-22 22:04:37 -07:00
Jon Maddox
45f0911640 move play_media to the top so it catches first 2015-10-08 20:37:59 -04:00
Jon Maddox
26939ce554 style 2015-10-07 01:37:40 -04:00
Jon Maddox
dbcc3a76ea style 2015-10-07 01:29:55 -04:00
Jon Maddox
6c4b2fd638 derp 2015-10-07 01:01:25 -04:00
Jon Maddox
6afb846d04 avoid key errors 2015-10-07 00:56:14 -04:00
Jon Maddox
ad549be353 support play_media for state restoration (for scenes) 2015-10-07 00:39:38 -04:00
Paulus Schoutsen
68c2b539ee More flexible domain config extraction 2015-09-28 23:09:05 -07:00
Paulus Schoutsen
3625646c34 Fix reproduce_state 2015-09-23 23:35:08 -07:00
Jon Maddox
efdd0c9e8a don't break the chain 2015-09-24 01:35:08 -04:00
Jon Maddox
8d42e42230 style 2015-09-24 00:38:18 -04:00
Jon Maddox
90f35b35cd moar derp 2015-09-24 00:20:17 -04:00