Commit Graph

39 Commits (289d6b6605e5b481d483762808dddd4f303f0e41)

Author SHA1 Message Date
Pascal Vizeli e1cbd6b4c0 MQTT convert to async (#6064)
* Migrate mqtt to async

* address paulus comment / convert it complet async

* adress paulus comment / remove future

* Automation triggers should be async

* Fix MQTT async calls

* Show that event helpers are callbacks

* Fix tests

* Lint
2017-02-18 14:17:18 -08:00
Paulus Schoutsen 5085cdb0f7 Add async_safe annotation (#3688)
* Add async_safe annotation

* More async_run_job

* coroutine -> async_save

* Lint

* Rename async_safe -> callback

* Add tests to core for different job types

* Add one more test with different type of callbacks

* Fix typing signature for callback methods

* Fix callback service executed method

* Fix method signatures for callback
2016-10-04 20:44:32 -07:00
Paulus Schoutsen 7ab7edd81c Make automation async 2016-10-01 14:11:16 -07:00
Paulus Schoutsen b650b2b0db Spread async love (#3575)
* Convert Entity.update_ha_state to be async

* Make Service.call async

* Update entity.py

* Add Entity.async_update

* Make automation zone trigger async

* Fix linting

* Reduce flakiness in hass.block_till_done

* Make automation.numeric_state async

* Make mqtt.subscribe async

* Make automation.mqtt async

* Make automation.time async

* Make automation.sun async

* Add async_track_point_in_utc_time

* Make helpers.track_sunrise/set async

* Add async_track_state_change

* Make automation.state async

* Clean up helpers/entity.py tests

* Lint

* Lint

* Core.is_state and Core.is_state_attr are async friendly

* Lint

* Lint
2016-09-30 12:57:24 -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
Paulus Schoutsen 3fa1963345 Convert automation to entities with services 2016-08-25 23:36:48 -07:00
happyleavesaoc 8df91e6a17 numeric state: validate multiple entities (#2066)
* validate multiple entities

* point to current entity
2016-05-14 12:29:57 -07:00
Paulus Schoutsen 6354399d55 Initial script condition support (#1910) 2016-04-28 12:03:57 +02:00
Paulus Schoutsen 4e568f8b99 Automation: Add trigger context and expose to action 2016-04-21 13:59:42 -07:00
Fabian Affolter fb7bd1bfe1 Fix PEP257 issues 2016-03-07 20:20:07 +01:00
Fabian Affolter 6ac9210919 Modify docstrings to match PEP257 2016-03-07 18:50:30 +01:00
Fabian Affolter 582394bc3b Modify import of template and PEP257 2016-02-23 21:19:22 +01:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Paulus Schoutsen 3b7b12bbd5 Make Flake8 happy 2016-01-12 21:53:27 -08:00
Philip Lundrigan a0ff8819a9 Make numeric_state error message more descriptive 2015-12-17 17:37:39 -07:00
Philip Lundrigan 9fa8b27d65 Change from `value` to `state` 2015-12-15 10:12:43 -07:00
Philip Lundrigan 455a9c83a6 Simplify logic 2015-12-15 08:57:30 -07:00
Philip Lundrigan a517784c9e Condense in_range template logic 2015-12-14 15:07:35 -07:00
Philip Lundrigan 91a945f4c7 Slight style change 2015-12-14 15:01:38 -07:00
Philip Lundrigan 53239387e0 Add support for template 2015-12-14 14:47:24 -07:00
Paulus Schoutsen a3981be501 Merge pull request #681 from pavoni/add_solar_elevation
Add automations based on Solar Elevation
2015-11-29 14:14:26 -08:00
Paulus Schoutsen a301d869d7 PyLint 1.5 fixes 2015-11-29 13:49:05 -08:00
pavoni 73e3ce5044 Fix bug 2015-11-29 12:18:54 +00:00
pavoni f4c3fbe8fd Add attribuet config to numeric state platform to allow trigger based in attributes rather than states. 2015-11-29 11:56:47 +00:00
Fabian Affolter 97f9f8aa49 Update link to docs (Jekyll 3 update) 2015-11-09 13:12:18 +01:00
Fabian Affolter cb69ac30ec Add link to docs 2015-10-13 21:07:53 +02:00
Paulus Schoutsen b2ad8db86b Add condition type to automation component 2015-09-14 22:51:28 -07:00
Paulus Schoutsen 68c1dd7cd4 Refactor automation configuration 2015-09-14 22:05:40 -07:00
Paulus Schoutsen fe2a9bb83e Fix numeric state if 2015-09-14 20:46:57 -07:00
Stefan Jonasson d5198d4242 Implemented the if condition support in numeric state 2015-09-14 20:33:01 +02:00
Paulus Schoutsen 2a11d02fe4 Add if to automation 2015-09-13 22:27:27 -07:00
Stefan Jonasson 8360ab265c Not used to pylint and flake8 ... 2015-09-13 20:34:45 +02:00
Stefan Jonasson e3dcb45879 Fixed pylint error 2015-09-13 20:27:11 +02:00
Stefan Jonasson 9904727cde homeassistant/components/automation/numeric_state.py:61:80: E501 line too long (80 > 79 characters)
The command "flake8 homeassistant" exited with 1.
2015-09-13 20:16:51 +02:00
Stefan Jonasson e9da02d70c Fixed value error exception
Fixed unittest
2015-09-13 19:59:26 +02:00
Stefan Jonasson a2ca60159d Fixed logic 2015-09-13 13:05:36 +02:00
Stefan Jonasson 8e89308a15 Added better handling if we did not get a value for the numeric check 2015-09-13 12:15:21 +02:00
Stefan Jonasson 4eba1250e9 Added a numeric_state automation platform 2015-09-12 21:42:52 +02:00