Paulus Schoutsen
5779d64e98
Fix some issues for PyLint 1.7.2 ( #8356 )
...
* Fix some issues for PyLint 1.7.2
* More fixes
* Revert position change for cover
2017-07-05 20:02:16 -07:00
Paulus Schoutsen
d73b695e73
EntityComponent to retry platforms that are not ready yet ( #8209 )
...
* Add PlatformNotReady Exception
* lint
* Remove cap, adjust algorithm
2017-06-26 09:41:48 -07:00
Paulus Schoutsen
18935440ed
Fix EntityComponent handle entities without a name ( #8065 )
...
* Fix EntityComponent handle entities without a name
* Implement solution by Anders
2017-06-17 10:50:59 -07:00
Pascal Vizeli
2438c6b7c2
Fix attribute entity ( #8066 )
...
* Bugfix entity attribute setter
* Fix tests
* Fix tests part 2
* Change filter only None
* Fix tests part 3
* Update entity.py
* Fix tests
2017-06-17 10:03:49 -07:00
Pascal Vizeli
814834512a
Group service / dynamic handling ( #7971 )
...
* Add Service to group
* Finish service
* Add service functions
* fix lint
* Address paulus comments
* fix lint & cleanup
* fix lint
* fix lint
* fix lint p3
* add test for check group
* add more tests
* fix lint
* Update service.yaml
* Fix order for tests
* Fix comment
* Fix test
* Fix tests
* Fix name in tests
* Fix view
* Fix default value
* Fix lint
* Fix key error
* add name
* migrate component entity
* fix tests
* fix import
* migrate device tracker
* fix lint
* fix bug
* fix logic
* fix lint
* fix tests
* fix generator
* fix group
* fix other tests.
* Not need to load group on first stage anymore.
* fix service
* add more group depency
* fix tests
* Revert "fix tests"
This reverts commit 35a922b3a8
.
* Real fix
* fix test p2
* fix test p3
* fix test p4
* fix test p5
* fix test p6
* fix lint
* fix test p7
* Rename attribute
* fix group test
* fix bug
* fix flagy tests
* fix service.yaml
* fix lint
2017-06-16 00:52:28 +02:00
Paulus Schoutsen
640c692e1f
Fix platforms being able to block startup ( #7970 )
2017-06-09 12:11:58 +02:00
Fabian Affolter
0863d50210
Fix typos ( #7957 )
...
Add an optional extended description…
2017-06-08 15:53:12 +02:00
Adam Mills
beb8c05d91
Use expected behvaior for above/below ( #7857 )
2017-06-01 22:43:24 -07:00
Paulus Schoutsen
f43db3c615
Replace executor with async_add_job ( #7658 )
...
* Remove executor
* Lint
* Lint
* Fix tests
2017-05-26 08:28:07 -07:00
Anton Sarukhanov
7055fddfb4
Don't block startup more than 60 seconds while waiting for components. ( #7739 )
2017-05-23 14:29:27 -07:00
Anton Sarukhanov
f3dabe21ab
Prevent the random template filter from caching its output. Fixes #5678 ( #7716 )
2017-05-23 10:32:06 -07:00
Anders Melchiorsen
bb8de5845a
Sort entities in default groups by name ( #7681 )
...
* Sort entities in default groups by name
* Cleanups from review
2017-05-21 17:05:48 -07:00
Anders Melchiorsen
81f0826550
Ignore attribute changes in automation trigger from/to ( #7651 )
...
* Ignore attribute changes in automation trigger from/to
* Quote names in deprecation warnings
This makes it somewhat easier to read if the suggestion happens to be
named "to".
* Add test with same state, new attribute value
2017-05-20 15:18:59 -04:00
Adam Mills
40d27cde0e
Refactor sun component for correctness ( #7295 )
...
* Refactor sun component for correctness
* Convert datetimes to dates for astral
* Fix tests for updated code
* Fix times now that calcs are fixed
* Move sun functions to helpers
* Fix flake on new file
* Additional tweaks from review
* Update requirements
2017-05-09 00:03:34 -07:00
Fabian Affolter
4d52b0ecd5
Update docstrings ( #7405 )
...
* Update docstrings
* Fix lint issues
* Update docstrings
2017-05-02 22:47:20 +02:00
Fabian Affolter
a4f1f6e724
Update docstrings ( #7374 )
...
* Update docstrings
* Update docstrings
* Update docstrings
* Update docstrings
* Update docstrings
* Update docstrings
* Update docstring
* Update docstrings
* Update docstrings
* Fix lint issues
* Update docstrings
* Revert changes in dict
2017-05-02 09:18:47 -07:00
Paulus Schoutsen
9afbbbf3fe
Remove ordered_dict validator ( #7375 )
...
* Remove ordered_dict validator
* Lint
* Update test_config_validation.py
2017-04-30 10:55:03 -07:00
Fabian Affolter
cfc023e128
Don't use len(SEQUENCE) as condition value ( #7249 )
...
* Don't use len(SEQUENCE) as condition value
* Update volvooncall.py
2017-04-23 20:41:09 -07:00
Fabian Affolter
8ba41563c9
Disable invalid-sequence-index ( #7177 )
2017-04-19 14:09:00 +02:00
Pascal Vizeli
d7ca9e7a66
Make core to look avilable state of device on servicecall ( #7045 )
2017-04-11 08:59:46 -07:00
Paulus Schoutsen
8c97bccaaa
Handle aiohttp task cancellation better ( #6862 )
2017-03-31 11:55:22 +02:00
Paulus Schoutsen
714b516176
aiohttp 2 ( #6835 )
...
* Upgrade aiohttp2
* Fix resource caching
* Fix helpers.aiohttp_client
* Lint
* Use static path for api error_log
* Fix ClientErrors import
* Remove not needed DisconnectError
* Remove releasing responses code
* Add timeout if stream starts non responding
* More async_aiohttp_proxy_stream cleanup
* Fix references to ClientError
* Fix fingerprinting
* Fix aiohttp stream tests
* Rename aiohttp_proxy_stream
* Remove impossible darksky test
* Fix sleepiq requests escaping mocker
* Lint
* Remove deprecated parameter
* Break up aiohttp_proxy_stream in 2 methods
* Lint
* Upgrade to aiohttp 2.0.4
* Convert connector close to a callback
* Fix static fingerprinted links
2017-03-30 00:50:53 -07:00
Paulus Schoutsen
de231cf9ab
restore_state: do not crash if domain not defined ( #6714 )
2017-03-20 08:54:51 -07:00
Paulus Schoutsen
e265401cd0
self.loop.create_task -> self.add_job ( #6632 )
...
* self.loop.create_task -> self.add_job
* Core to use create task
2017-03-16 06:58:54 +01:00
Paulus Schoutsen
96e22c7b41
Remove event decorators ( #6634 )
2017-03-15 14:46:57 +01:00
Pascal Vizeli
5529d77c62
Prevent entities running multiple updates simultaneously ( #6511 )
...
* Protect entity for multible updates on same time.
* Address all comments / make update more robust
* fix unittest
* fix lint
* address comments
2017-03-14 09:26:55 -07:00
Pascal Vizeli
20fcd1f0e2
Bugfix mqtt socket memory error ( #6501 )
...
* Bugfix mqtt socket memory error
* Fix tests
* Fix lint
2017-03-09 06:31:43 -08:00
Paulus Schoutsen
bb4f23f8e7
Add warning for slow platforms/components ( #6467 )
...
* Add warning for slow platforms/components
* Add test for slow component setup.
* Add test for slow platform setup
* Fix tests on Py34
2017-03-07 20:31:57 -08:00
Paulus Schoutsen
7655b6271d
Better restore_state warnings ( #6418 )
2017-03-05 10:54:49 +01:00
Paulus Schoutsen
e8a22cb4a8
Tweak recorder/restore_state ( #6412 )
...
* Tweak recorder/restore_state
* Lint
2017-03-05 10:52:08 +01:00
Paulus Schoutsen
2650c73a89
Split bootstrap into bs + setup ( #6416 )
...
* Split bootstrap into bs + setup
* Lint
2017-03-05 10:41:54 +01:00
Pascal Vizeli
8232f1ef65
Cleanup async handling ( #6388 )
...
* Cleanups unneeded blocks
* Cleanup bootstrap
* dedicated update_ha_state
* Fix imap_email_content
* fx tests
* Fix lint & spell
2017-03-04 15:10:36 -08:00
Jose Juan Montes
4da2156ebf
Return None instead of raising ValueException from as_timestamp template function. ( #6155 )
2017-03-02 22:18:01 -08:00
Pascal Vizeli
41f558b181
Bootstrap / Component setup async ( #6264 )
...
* Bootstrap / Entiy setup async
* Cleanup add_job stuff / return task/future object
* Address paulus comments / part 1
* fix install pip
* Cleanup bootstrap / move config stuff to config.py
* Make demo async
* Further bootstrap improvement
* Address Martin's comments
* Fix initial tests
* Fix final tests
* Fix bug with prepare loader
* Remove no longer needed things
* Log error when invalid config
* More cleanup
* Cleanups platform events & fix lint
* Use a non blocking add_entities callback for platform
* Fix Autoamtion is setup befor entity is ready
* Better automation fix
* Address paulus comments
* Typo
* fix lint
* rename functions
* fix tests
* fix test
* change exceptions
* fix spell
2017-02-28 20:33:19 -08:00
Paulus Schoutsen
61909e873f
Feature/reorg recorder ( #6237 )
...
* Re-organize recorder
* Fix history
* Fix history stats
* Fix restore state
* Lint
* Fix session reconfigure
* Move imports around
* Do not start recording till HASS started
* Lint
* Fix logbook
* Fix race condition recorder init
* Better reporting on errors
2017-02-26 14:38:06 -08:00
Johann Kellerman
5d007e636b
No wait for start and more async
2017-02-25 17:51:37 +02:00
Pascal Vizeli
81ca978413
Move mqtt from eventbus to dispatcher / add unsub for dispatcher ( #6206 )
...
* Move mqtt from eventbus to dispatcher / add unsub for dispatcher
* Fix lint
* Fix test
* Fix lint v2
* fix dispatcher_send
2017-02-24 17:11:50 -08:00
Johann Kellerman
c940d26f07
Bugfix restore startup state ( #6189 )
2017-02-23 20:06:21 -08:00
Pascal Vizeli
f2a2d6bfa1
Refactory of envisalink ( #6160 )
...
* Refactory of envisalink
* remove event buss
* init dispatcher from hass.
* Move platform to new dispatcher
* fix lint
* add unittest & threadded functions
* fix copy & past error
2017-02-23 13:02:56 -08:00
Johann Kellerman
fdc373f27e
Restore_state helper to restore entity states from the DB on startup ( #4614 )
...
* Restore states
* feedback
* Remove component move into recorder
* space
* helper
* Address my own comments
* Improve test coverage
* Add test for light restore state
2017-02-20 23:40:27 -08:00
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
f29ee24b72
Do not allow config dependency ( #6036 )
...
* Do not allow config dependency
* Prevent config in discovery
* Migrate to blacklist
2017-02-18 11:31:37 -08:00
Paulus Schoutsen
235d0057b1
Simplify customize ( #6007 )
...
* Simplify customize
* Maintain glob order
* Have glob overrule domain
2017-02-15 19:47:30 -08:00
Pascal Vizeli
4b8e6e36b6
Make EntityComponent update process more robust. ( #5943 )
...
* Make EntityComponent update process more robust.
* address paulus comments
* Add platform to log message.
2017-02-14 09:32:40 -08:00
Pascal Vizeli
41849eab06
Core cleanup: two stage shutdown ( #5876 )
...
* Core cleanup: two stage shutdown
* fix spell
* fix
* add async logger to close
* change aiohttp to use CLOSE
* address paulus comments
* Fix tests
* Add unittest
2017-02-13 06:24:07 +01:00
Pascal Vizeli
9aac2113b6
Add 'wait_template' to script commands / Refactory track_template ( #5827 )
...
* Add 'wait' to script commands.
* Add track_template + unittest / rename wait_template
* fix lint & test
* Fix handling / change automation-template / add tests
* address paulus comments
2017-02-12 13:27:53 -08:00
Adam Mills
e877d572f5
binary_sensor sensor_class to entity device_class ( #5860 )
...
* binary_sensor sensor_class to entity device_class
* Linter fixes
* Should be it
2017-02-10 20:46:15 -08:00
Erik Eriksson
c7c3b30e0a
Do not call state if device isn't available ( #5835 )
2017-02-10 08:59:58 -08:00
Paulus Schoutsen
c54517de90
Convert config.components to a set ( #5824 )
2017-02-09 20:21:57 +02:00
Paulus Schoutsen
4398b8b5c6
Deprecate event decorators ( #5822 )
2017-02-09 00:10:38 -08:00
Pascal Vizeli
2cbed9cd96
Move signal handling out of core to bootstrap ( #5815 )
...
* Move signal handling out of core to bootstrap
* Fix tests
2017-02-08 21:58:45 -08:00
Adam Mills
ecfe8e0a9a
Formalize supported_features as entity property ( #5794 )
...
* Formalize supported_features as entity property
* Remove extra emulated_hue conditions
* Generate log message in executor
2017-02-07 20:42:45 -08:00
Stéphane Bidoul (ACSONE)
7927a6b588
add min and max jinja filters ( #5765 )
2017-02-07 00:25:47 -08:00
Pascal Vizeli
10a104271e
Cleanup climate platform for async update_ha_state / migrate generic thermostat ( #5679 )
...
* Cleanup climate from blocking stuff / migrate generic
* Migrate generic thermostat
* fix tests
* fix lint
2017-02-01 21:44:05 -08:00
andrey-git
1fb372ffdb
Apply new customize format to Zwave ( #5603 )
2017-01-28 22:29:51 +02:00
Duoxilian
b732174def
Hold mode ( #5586 )
...
* Initial commit of hold_mode feature.
* Added deprecation warning for climate.away_mode
* Add tests to demo environment.
2017-01-27 08:57:18 -08:00
Martin Hjelmare
a09a772f43
Add more validation for mysensors ( #5493 )
...
* Move isdevice validator under helpers.config_validation.
* Check that all persistence files are set and are unique if any is set
by user. This is necessary to avoid file name clashes.
* Check that a set persistence file has an existing and writable
directory.
* Check that a device is either a valid device file, "mqtt", or a valid
domain name or ip address.
2017-01-24 22:04:44 -08:00
Pascal Vizeli
92858554e6
Bugfix endless aiohttp streamreader ( #5540 )
2017-01-24 20:43:36 +01:00
Fabian Affolter
64fc6a08d3
Fix typos ( #5522 )
2017-01-23 13:25:38 -08:00
andrey-git
addc2c4340
Allow easier customization of whole domain, entity lists, globs. ( #5215 )
2017-01-22 21:19:50 +02:00
Pascal Vizeli
8da398c0bd
Proxy aiohttp websession / more rebust. ( #5419 )
2017-01-19 09:55:27 -08:00
Daniel Høyer Iversen
467cb18625
Add last triggered to script ( #5261 )
...
* Add last triggered to script
* Add tests for script last_triggered
2017-01-11 16:23:05 +01:00
Pascal Vizeli
a65388e778
Bugfix segfault with new helper track_time_interval ( #5222 )
...
* Bugfix sigfault with new helper track_time_interval
* Add none init also to sunrise/sunset for consistance
2017-01-08 14:06:15 +01:00
Pascal Vizeli
ca4a857532
Improve aiohttp default clientsession close with connector ( #5208 )
2017-01-07 21:11:19 +01:00
Pascal Vizeli
1719d88602
Bugfix default values to timedelta ( #5193 )
...
* Bugfix default values to timedelta
* fix unittests
2017-01-06 00:16:12 +01:00
Pascal Vizeli
50a8ec7335
Bugfix aiohttp connector pool close on shutdown ( #5190 )
...
* Bugfix aiohttp connector pool close on shutdown
* fix circular import
* remove lint disable
2017-01-05 23:09:04 +01:00
Nick Touran
a36ca62445
Support longer-than-60-second scan_interval and interval_seconds ( #5147 )
...
* Update scan_interval and interval_seconds max to 1 day vs. 60 seconds
* Format fixes
* Add docstring on unittest.
* Added and implemented new async_track_time_interval helper.
* Format fixes, removed unused import.
* Undid whoops on unsub_polling.
* Updated unit tests for scan_interval.
* Added unit test for track_time_interval.
* Allow other forms of time interval input for scan_interval and interval_seconds
2017-01-05 23:05:16 +01:00
Johann Kellerman
cbda516af9
ensure_list validator - Allow None to return an empty list ( #5133 )
2017-01-05 21:33:22 +02:00
Daniel Høyer Iversen
67ab1f69d8
user agent header ( #5172 )
...
* user agent in header
* update user agent info
* Use user-agent from lib
2017-01-04 21:15:50 +01:00
Brian Torres-Gil
7b6503c017
Ecobee service fix and new 'resume program' service ( #4510 )
...
* ecobee_set_fan_min_on_time: fix issue using 'entity_id' field and add service field help text
* climate.ecobee: add 'resume_program' service
* Add default value for resume_all and correct entity_id field name reference
2016-12-27 21:56:26 +01:00
Pascal Vizeli
244cdf43d0
Async reduce coro ( #5001 )
...
* Asyncio coro reduce
* Replace comments
2016-12-26 14:10:23 +01:00
Paulus Schoutsen
cc9e5de503
Only report slowness warning once per entity ( #4962 )
2016-12-17 13:00:08 -08:00
Pascal Vizeli
8295fc8b4c
Pararell execute state restore by domain ( #4801 )
...
* Pararell execute state restore per domain
* fix spell
2016-12-07 08:37:35 -08:00
Jan Losinski
d0dcd1bb73
Scene: add support for input_select ( #4674 )
...
This adds support for the scene component to handle input_select
devices and set their options.
This fixes bug #4673
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2016-12-07 05:33:41 -08:00
Pascal Vizeli
2e6a48ff5f
WIP: Migrate scene to async + homeassistant scene async ( #4665 )
...
* Migrate scene to async + homeassistant scene async
* fix lint
* Update state.py
* Fix tests
2016-12-01 21:38:12 -08:00
Pascal Vizeli
cf57db919e
Refactory aiohttp clientsession handling in HA ( #4602 )
...
* Refactory aiohttp clientsession handling in HA
* remove from core / update platforms / rename file
2016-11-27 16:26:46 -08:00
Vlad Korniev
2a7bc0e55c
Advanced Ip filtering ( #4424 )
...
* Added IP Bans configuration
* Fixing warnings
* Added ban enabled option and unit tests
* Fixed py34 tox
* http: requested changes fix
* Requested changes fix
2016-11-24 21:52:10 -08:00
Paulus Schoutsen
2c7e895105
Entity and climate: do not convert temperature unnecessary ( #4522 )
...
* Climate: more consistent units
* Prevent unnecessary conversion in entity component
* int -> round
* Disable Google tests because they connect to the internet
* Remove default conversion rounding F->C
* Add rounding of temp to weather comp
* Fix equality
* Maintain precision when converting temp in entity
* Revert "Disable Google tests because they connect to the internet"
This reverts commit b60485dc19
.
2016-11-22 17:38:04 -08:00
Paulus Schoutsen
c81735cc84
Fix platform discovery when platform discovered during discovery of a ( #4529 )
...
component
2016-11-22 08:21:08 -08:00
Pascal Vizeli
835577b2bc
Bugfix discovery use wrong time async ( #4515 )
...
* Bugfix discovery use wrong time async
* fix lint
2016-11-21 19:33:08 -08:00
Paulus Schoutsen
455e1df7cb
Fix typo
2016-11-19 16:05:33 -08:00
Paulus Schoutsen
d930c399fe
Better locking while setting up components + discovery ( #4463 )
2016-11-19 08:18:33 -08:00
Paulus Schoutsen
d2bbc6ef70
Upgrade linter ( #4461 )
2016-11-18 21:47:59 -08:00
Pascal Vizeli
c56f99baaf
Async migration device_tracker ( #4406 )
...
* Async migration device_tracker
* change location stuff to async
* address paulus comments
* fix lint & add async discovery listener
* address paulus comments v2
* fix tests
* fix test_mqtt
* fix test_init
* fix gps_acc
* fix lint
* change async_update_stale to callback
2016-11-18 23:35:08 +01:00
Paulus Schoutsen
f006b00dc1
Fix spelling schedule_update_ha_state ( #4415 )
2016-11-16 08:26:29 -08:00
Pascal Vizeli
41aaeb715a
Convert switch to AsnycIO ( #4382 )
...
* Convert switch to AsnycIO
* Move update entity to service
* use time better for faster handling
* Change to suggestion from paulus
* Use new shedule_update_ha_state
* fix lint
* minimize executor calls
2016-11-15 21:06:50 -08:00
pvizeli
cb24282040
Faster async entity update on component.
2016-11-14 14:18:04 +01:00
Pascal Vizeli
71a305ea45
Hotfix deadlock on platform setup ( #4354 )
...
* Hotfix deadlock on platform setup
* fix wrong import
2016-11-12 16:19:13 -08:00
Lewis Juggins
01a6c1c1c8
Add strptime template function ( #3950 )
2016-11-10 22:57:44 -08:00
Pascal Vizeli
ba2ea35089
Add logging to platform/component setup ( #4300 )
...
* Add timeout to platform/component
* Revert "Add timeout to platform/component"
This reverts commit 280a311e48
.
* Add logging data
* Change log message with paulus comments
2016-11-10 18:46:31 +01:00
Paulus Schoutsen
04dbc992ec
Increase update delay ( #4321 )
2016-11-09 07:21:58 -08:00
Pascal Vizeli
618a86a37c
Set executor to 15 and help to reduce flooting async core with updates ( #4252 )
...
* Set executor to 15 and help to reduce flooting async core with udpates
* fix typing
* if it a executor, wait
* address comments from paulus
* add space for style :)
* fix spell
* Update entity_component.py
* Update entity_component.py
2016-11-06 22:28:03 -08:00
Paulus Schoutsen
a343c20404
Async gather wait ( #4247 )
...
* Fix config validation for input_*, script
* Allow scheduling coroutines
* Validate entity ids when entity ids set by platform
* Async: gather -> wait
* Script/Group: use async_add_job instead of create_task
2016-11-06 09:26:40 -08:00
Paulus Schoutsen
4cc417677e
Add link to issue in warning slow entity update ( #4211 )
2016-11-03 22:45:01 -07:00
Paulus Schoutsen
525d735f21
Warn if fetching properties takes too long ( #4208 )
...
* Warn if fetching properties takes too long
* Update entity.py
2016-11-03 21:58:25 -07:00
Pascal Vizeli
e5d69feb93
Fix blocking/stack trace with empty list ( #4191 )
2016-11-03 18:33:18 -07:00
Paulus Schoutsen
ee5f228309
Make services yield ( #4187 )
...
* Make services yield
* Disable pylint abstract-method check
* add input_select
* add input_slider
* change to async vers.
* fix lint
* yield on add_entities as other components does
2016-11-03 18:32:14 -07:00
Paulus Schoutsen
2940fb72fb
EntityComponent.add_entities now converts generators to a list ( #4183 )
2016-11-02 19:24:25 -07:00
Fabian Affolter
be272ac64a
Disable too-many-* ( #4107 )
...
* Disable too-many-* and too-few-public-methods
* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Pierre Ståhl
33e46b484f
Add service to change visibility of a group ( #3998 )
2016-10-29 16:54:26 -07:00