Commit graph

1879 commits

Author SHA1 Message Date
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
Jon Maddox
082920abe0 moar constants 2015-09-24 00:20:05 -04:00
Jon Maddox
4a8bbc52e0 derp 2015-09-24 00:15:36 -04:00
Jon Maddox
1674c8309a Support playing, pausing states for media players when reproducing state
This allows the state helper to call the correct service call for
media_players when attempting to resolve state.
2015-09-24 00:06:05 -04:00
Paulus Schoutsen
5af1643297 Add warning when entity not found in reproduce_state 2015-09-15 22:23:07 -07:00
Paulus Schoutsen
f9b17ab026 Device tracker rewrite 2015-09-09 23:37:15 -07:00
Ryan Kraus
f5b98c86f0 Mostly PyLint and Flake8 updates.
Rewrote imports of exceptions to be from the exceptions module.
Made nmap scanner check for libnmap dependency without crashing.
Various flake8 and pylint updates.
2015-08-29 22:34:35 -04:00
Paulus Schoutsen
086961d109 Add temperature util, helpers 2015-08-16 22:06:01 -07:00
Paulus Schoutsen
1b89a502c4 Extract core into own submodule 2015-08-16 20:44:46 -07:00
Paulus Schoutsen
d2b5f429fe Remove deprecated code 2015-08-04 16:21:09 -04:00
Paulus Schoutsen
14023a15e6 Minor code cleanup 2015-08-04 18:13:55 +02:00
Paulus Schoutsen
382c1de981 Built-in components no longer use deprecated methods 2015-08-03 17:08:13 +02:00
Paulus Schoutsen
7870e9a5e2 Minor cleanup core 2015-08-03 17:05:33 +02:00
Paulus Schoutsen
e0468f8b8e Extract helpers.event from core + misc cleanup 2015-07-26 10:45:49 +02:00
Paulus Schoutsen
66a380dd8e Ensure generate_entity_id returns valid entity ids 2015-06-01 22:55:33 -07:00