Paulus Schoutsen
166d770ddd
Update Hue data fetching ( #31338 )
...
* Refactor Hue Lights to use DataCoordinator
* Redo how Hue updates data
* Address comments
* Inherit from Entity and remove pylint disable
* Add tests for debounce
2020-01-31 14:47:40 -08:00
Bas Nijholt
67c56c860d
Sort imports according to PEP8 for 'homeassistant' folder ( #29789 )
...
Components are already done
2019-12-09 16:42:10 +01:00
Ville Skyttä
f88ead597a
Type hint improvements ( #28260 )
...
* Add and improve core and config_entries type hints
* Complete and improve config_entries type hints
* More entity registry type hints
* Complete helpers.event type hints
2019-10-28 13:36:26 -07:00
Ville Skyttä
70ddab2f3c
Helpers type hint additions and improvements ( #27986 )
...
* Helpers type hint additions and improvements
* Fix async setup dump callback signature
2019-10-21 17:54:59 +03:00
Ville Skyttä
33e1b44b3a
Use PEP 526 type annotations, add some type hints ( #26464 )
...
* Add some more type hints to helpers.event
* Change most type comments to variable types
* Remove some superfluous type hints
2019-09-07 09:48:58 +03:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Ville Skyttä
d64f1e767c
Type check all helpers ( #25373 )
...
* Type check all helpers, add inline exclusions for work in progress
* Remove unused Script._template_cache
* Add some missing type hints
* Remove unneeded type: ignore
* Type hint fixes
* Mypy assistance tweaks
* Don't look for None in deprecated config "at most once" check
* Avoid None name slugify attempt when generating entity id
* Avoid None state store attempt on entity remove
2019-07-21 09:59:02 -07:00
Paulus Schoutsen
236c5deeee
Sun listener to adapt to core config updates ( #24464 )
...
* Adaptable sun listener
* Lint
2019-06-10 16:05:32 -07:00
Paulus Schoutsen
48a2e50f84
Fix calc next ( #21630 )
2019-03-03 21:36:13 -07:00
emontnemery
cd89809be5
Make time trigger data trigger.now local ( #21544 )
...
* Make time trigger data trigger.now local
* Make time pattern trigger data trigger.now local
* Lint
* Rework according to review comment
* Lint
2019-03-01 23:09:12 -08:00
Ville Skyttä
9c840f93f0
Use const.SUN_EVENT_* more ( #18039 )
2018-10-31 09:10:28 +01:00
Otto Winter
26cf5acd5b
Make async_track_time_change smarter ( #17199 )
...
* Make async_track_time_change smarter
* Move to util/dt
* Remove unnecessary check
* Lint
* Remove tzinfo check
* Remove check
* Add comment about async_track_point_in_utc_time
* Fix typing check
* Lint
2018-10-09 10:14:18 +02:00
Adam Mills
3abdf217bb
Homekit controller reconnect ( #17060 )
...
* Add threaded call_later helper
* Reconnect to device when connection fails
* Consolidate connection logs and warn on first
2018-10-04 09:25:05 +02:00
Ville Skyttä
b7c336a687
Pylint cleanups ( #15626 )
...
* Pylint 2 no-else-return fixes
* Remove unneeded abstract-class-not-used pylint disable
2018-07-23 10:16:05 +02:00
Ville Skyttä
b92350fb55
Lint cleanup ( #15103 )
...
* Remove unneeded inline pylint disables
* Remove unneeded noqa's
* Use symbol names instead of message ids in inline pylint disables
2018-06-25 13:05:07 -04:00
Matthias Urlichs
f5cc40024d
Rename homeassistant.util.async to .async_ ( #13088 )
...
"async" is (going to be) a reserved word.
2018-03-11 10:01:12 -07:00
Paulus Schoutsen
f2296e1ff8
Retry keyset cloud ( #12270 )
...
* Use less threads in helpers.event tests
* Add helpers.event.async_call_later
* Cloud: retry fetching keyset
2018-02-10 11:40:24 +01:00
Otto Winter
8dcfd35b8b
Spelling fixes ( #12041 )
...
* Spelling fixes
*Lots* of them.
* Spelling breaking changes
* Fix lint errors
2018-01-29 23:37:19 +01:00
Ville Skyttä
55ee8959ba
Spelling fixes ( #11940 )
2018-01-27 11:58:27 -08:00
cdce8p
be5c0b2d92
Wait_template - support for 'trigger.entity_id' and data_template values ( #9807 )
...
* *Added support for use of 'trigger.entity_id' and service->data_template->script in wait_template
* * Fixed style violations
* * Fixed regular expression (_RE_GET_POSSIBLE_ENTITIES)
* * combined 'extract_entities' and 'extract_entities_with_variables'
* fixed regular expression
* * Added first test for extract_entities_with_variables
* * Added Unittests (tests/helpers/test_template.py test_extract_entities_with_variables)
* * Added Unittests (tests/helpers/test_script.py test_wait_template_variables)
* * Added Unittests (tests/components/automation/test_template.py test_wait_template_with_trigger)
* * Added Unittests (tests/components/automation/test_state.py test_wait_template_with_trigger)
* * Added Unittests (tests/components/automation/test_numeric_state.py test_wait_template_with_trigger)
* * Fixed style violations
* * Fixed style violations
* * Fixed style violations
* * Fixed style violations
* * Fixed style violations
* * Fixed style violations
* * Updated regular expression and delete whitespaces
2017-10-12 16:57:18 +02:00
Paulus Schoutsen
8f06b35dfc
Optimize event matcher ( #9798 )
...
* Optimize event matcher
* Tweak order of checks
* Add a benchmark for time_changed helper
* Add state change benchmark
* fix lint
2017-10-10 22:26:03 +02:00
Paulus Schoutsen
a97e7bb22d
Simplify track_same_state ( #9795 )
2017-10-10 21:16:19 +02:00
Paulus Schoutsen
ca54bbfcc9
RFC: Use bind_hass for helpers ( #9745 )
...
* Add Helpers bind_hass functionality
* Update other helpers
2017-10-08 08:17:54 -07:00
Pascal Vizeli
ed699896cb
Core track same state for a period / Allow on platforms ( #9273 )
...
* Core track state period / Allow on platforms
* Add tests
* fix lint
* fix tests
* add new tracker to automation state
* update schema
* fix bug
* revert validate string
* Fix bug
* Set arguments to async_check_funct
* add logic into numeric_state
* fix numeric_state
* Add tests
* fix retrigger state
* cleanup
* Add delay function to template binary_sensor
* Fix tests & lint
* add more tests
* fix lint
* Address comments
* fix test & lint
2017-09-05 02:01:01 +02:00
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
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
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
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
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
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
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
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
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
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
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
325220e009
Make track_point_in_utc_time more async ( #3428 )
...
* Make track_point_in_utc_time more async
* Make track_point_in_time async friendly
2016-09-17 19:51:18 -07:00
Paulus Schoutsen
aca375c312
Asyncio event helpers ( #3415 )
...
* Automation - Event: Use coroutine
* Convert event helpers to coroutine
* Fix linting
* Add hass.async_add_job
* Automation - Event to use async_add_job
2016-09-17 18:28:01 -07:00
Paulus Schoutsen
60f540315a
Fix broken test
2016-09-01 14:40:13 +01:00
Paulus Schoutsen
d9ecc4af64
EventBus: return function to unlisten
2016-08-25 23:25:35 -07:00
Paulus Schoutsen
6dcf3682df
Tweak event helper
2016-06-12 20:37:37 -07:00
Paulus Schoutsen
3ac31b2c1b
Fix broken tests + linting
2016-05-30 10:19:12 -07:00
Paulus Schoutsen
15e329a588
Tons of fixes - WIP
2016-05-21 15:01:33 -07:00
Paulus Schoutsen
4e568f8b99
Automation: Add trigger context and expose to action
2016-04-21 13:59:42 -07:00
Fabian Affolter
4f536ac63d
Fix PEP257 issues
2016-03-07 23:39:52 +01:00
Paulus Schoutsen
e80309c03c
Fix imports (using isort)
2016-02-18 21:27:50 -08:00
Paulus Schoutsen
ada2fb4ec0
Fire event when we remove a state
2016-02-13 22:57:40 -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