Commit graph

14 commits

Author SHA1 Message Date
Paulus Schoutsen
d58548dd1c Address asyncio comments (#3663)
* Template platforms: create_task instead of yield from

* Automation: less yielding, more create_tasking

* Helpers.script: less yielding, more create_tasking

* Deflake logbook test

* Deflake automation reload config test

* MQTT: Use async_add_job and threaded_listener_factory

* Deflake other logbook test

* lint

* Add test for automation trigger service

* MQTT client can be called from within async
2016-10-03 22:39:27 -07:00
Paulus Schoutsen
4198c42736 Have template platforms never leave the event loop 2016-10-01 14:11:16 -07:00
Paulus Schoutsen
00e298206e Optimize template 2 (#3521)
* Enforce compiling templates

* Refactor templates

* Add template validator to Logbook service

* Some more fixes

* Lint

* Allow easy skipping of rfxtrx tests

* Fix template bug in AND & OR conditions

* add entities extractor

Conflicts:
	tests/helpers/test_template.py

* fix unittest

* Convert template to be async

* Fix Farcy

* Lint fix

* Limit template updates to related entities

* Make template automation async
2016-09-27 21:29:55 -07:00
Paulus Schoutsen
0c0feda834 Pre-compile templates (#3515)
* Pre-compile templates

* Compile templates in numeric_state condition
2016-09-25 13:33:01 -07:00
Fabian Affolter
94e3986d54 Use constants and update ordering (#3261) 2016-09-08 16:26:54 +02:00
Greg Dowling
4795122463 Add voluptuous to binary template sensor (#2938)
* Add voluptuous to binary template sensor / update failing test.

* Update tests.

* Quick fixes to remove duplicate variables
2016-08-24 01:16:26 -07:00
Paulus Schoutsen
3ac31b2c1b Fix broken tests + linting 2016-05-30 10:19:12 -07:00
Paulus Schoutsen
a91f937245 Fix linting issues 2016-05-30 10:08:49 -07:00
Bart274
65fbba0e79 List entity_ids in config and only react to them (#2144)
* List entity_ids in config and only react to them

This allows us to define a list of entity_ids in the config to make the
template sensor, binary sensor and switch only react to state changes of
these entities instead of listening to all state changes.

* Forgot to import the track_state_change function

* Changed test for added entity_ids to config

* Use default MATCH_ALL and remove event_listener
2016-05-29 14:34:21 -07:00
Paulus Schoutsen
41f205e09d Clean up template platforms 2016-03-24 23:22:17 -07:00
pavoni
4e7160139e Fix race condition in template components. 2016-03-17 12:10:19 +00:00
Fabian Affolter
7035af6634 Fix PEP257 issues 2016-03-07 20:21:08 +01:00
pavoni
4e3c8a8697 Fix noisy error on startup. Make callbacks code consistent. 2016-03-06 19:19:07 +00:00
Dan Smith
a7519bb38b Add a template binary_sensor platform 2016-02-24 20:09:13 -08:00