Paulus Schoutsen
de12c21ce7
Fire config changed event during start ( #36812 )
2020-06-15 15:22:53 -07:00
J. Nick Koston
578d4a9b6a
Make the frontend available sooner (Part 1 of 2) ( #36263 )
...
* Part 1 of 2 (no breaking changes in part 1).
When integrations configured via the UI block startup or fail to start,
the webserver can remain offline which make it is impossible
to recover without manually changing files in
.storage since the UI is not available.
This change is the foundation that part 2 will build on
and enable a listener to start the webserver when the frontend
is finished loading.
Frontend Changes (home-assistant/frontend#6068 )
* Address review comments
* bump timeout to 1800s, adjust comment
* bump timeout to 4h
* remove timeout failsafe
* and the test
2020-06-02 13:54:11 -05:00
Pascal Vizeli
ed014e3c96
Revert "Ensure frontend is available if integrations fail to start - Part 1 of 2 ( #36093 )" ( #36251 )
...
This reverts commit fbe7b4ddfa
.
2020-05-29 10:18:39 +02:00
J. Nick Koston
fbe7b4ddfa
Ensure frontend is available if integrations fail to start - Part 1 of 2 ( #36093 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-28 21:09:07 -07:00
Franck Nijhof
d3ae8a938c
Fix handling of additional data in core config storage ( #35660 )
2020-05-16 13:31:15 +02:00
Franck Nijhof
e56dd8ed50
Detect use of deprecated base_url ( #35353 )
...
* Detect use of deprecated base_url
* Update get_url helper
* Update core migration
* Migrate all tests
2020-05-08 17:52:32 +02:00
Franck Nijhof
2223592486
Add get_url helper, deprecate base_url ( #35224 )
2020-05-08 02:29:47 +02:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
Franck Nijhof
98a2efcbab
Collection of random (mainly) test improvements ( #33733 )
2020-04-06 12:51:48 +02:00
Franck Nijhof
03dd92d51b
Use set literals in tests ( #33669 )
2020-04-05 02:20:09 +02:00
Phil Bruckner
bf1b408038
Handle cancellation in ServiceRegistry.async_call ( #33644 )
2020-04-04 15:36:33 -07:00
David F. Mulcahey
bcd1eb952c
RFC - Add a 3rd state to the HA shutdown sequence for writing… ( #33358 )
...
* add third stage to hass shutdown
* use 3rd stage in storage
* update core state
* add writing data to multi stop ignore
* update core test
* review comment
* update name based on feedback
2020-03-30 10:18:39 -07:00
Paulus Schoutsen
07fa844c43
Speed up validate_entity_id ( #32137 )
...
* Speed up validate_entity_id
* Add some more invalid entity IDs
* Adjust regular expression
* Extend and sort test cases
* Update regular expression, more cases, faster
* Adjust tests, allow start with number, disallow double underscore
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-02-24 08:35:02 -08:00
Paulus Schoutsen
beee1298c5
Extend safe mode ( #31927 )
...
* Extend safe mode
* Add safe mode boolean to config JSON output and default Lovelace
* Add safe mode to frontend
* Update accent color
2020-02-18 11:52:38 -08:00
Paulus Schoutsen
12de3f1e47
Clean up frontend services and events ( #31654 )
...
* Clean up frontend services and events
* Fix bug in core instead
* Add test that core works correctly with callback marked async funcs
2020-02-09 19:47:16 -08:00
Ville Skyttä
5e2ba2eb77
Enable some more bandit checks ( #30857 )
...
* Enable B108 (hardcoded tmp dir), address findings
* Enable B602 (subprocess popen with shell), address findings
* Enable B604 (start process with shell), address findings
* Enable B306 (mktemp), B307 (eval), and B325 (tempnam), no issues to address
2020-01-20 18:44:55 +02:00
Ville Skyttä
fa4fa30461
Various string cleanups ( #30435 )
...
* Remove some unnecessary string concatenations
* Replace some simple str.formats with f-strings
* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +01:00
Bas Nijholt
f60125b5c9
Sort imports according to PEP8 for 'tests' ( #29791 )
2019-12-09 16:52:24 +01:00
Pascal Vizeli
c1851a2d94
Cleanup coroutine threadsafe ( #27080 )
...
* Cleanup coroutine threadsafe
* fix lint
* Fix typing
* Fix tests
* Fix black
2019-10-01 16:59:06 +02:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Paulus Schoutsen
b90636f640
Update home zone when core config updated ( #24237 )
...
* Update home zone when core config updated
* Lint
2019-05-31 23:03:45 -07:00
Paulus Schoutsen
f995ab9d54
Don't pass in loop ( #23984 )
...
* Don't pass in loop
* Revert some changes
* Lint + Axis revert
* reinstate loop
* Fix a test
* Set loop
* Update camera.py
* Lint
2019-05-22 21:09:59 -07:00
Paulus Schoutsen
9e96397e6a
Require core config detection to be triggerd manually ( #24019 )
...
* Detect core config
* Remove elevation
* Lint
* Lint
* Fix type
2019-05-22 17:24:46 -07:00
Erik Montnemery
afe9fc221e
Fire event when core config is updated ( #23922 )
...
* Fire event when core config is updated
2019-05-20 20:02:36 +02:00
Erik Montnemery
c2fc8a0d61
Load HA core config from storage ( #23872 )
...
* Load HA core config from storage
* Tweak
* Lint, review comments
* Fix test
* Add tests
* Lint
* Address comments
2019-05-16 16:27:53 +02:00
Andrew Sayre
02d8731a61
Add HEOS sign-in/out services ( #23729 )
...
* Add HEOS sign-in/out services
* Fix typo in comment
2019-05-07 09:39:42 -07:00
Jason Hu
f1b867dccb
Re-thrown exception occurred in the blocking service call ( #21573 )
...
* Rethrown exception occurred in the actual service call
* Fix lint and test
2019-03-01 23:09:31 -08:00
Paulus Schoutsen
52f337ef00
Allow chaining contexts ( #21028 )
...
* Allow chaining contexts
* Add stubbed out migration
2019-03-01 10:08:38 -08:00
Paulus Schoutsen
cf3a8b60ff
Prevent invalid context from crashing ( #21231 )
...
* Prevent invalid context from crashing
* Lint
2019-02-20 08:02:56 +01:00
Paulus Schoutsen
d2fea76fd7
Add context to service call event ( #21181 )
2019-02-18 13:07:44 -08:00
Jason Hu
8137b0bb9e
Fix coroutine never awaited warning in test ( #20892 )
2019-02-09 15:13:12 -06:00
Andrew Sayre
e73569c203
Added partial detection to async_add_job ( #20119 )
2019-01-14 15:08:44 -08:00
Paulus Schoutsen
59581786d3
Add raw service data to event ( #19163 )
2018-12-10 12:58:51 +01:00
Paulus Schoutsen
df21dd21f2
RFC: Call services directly ( #18720 )
...
* Call services directly
* Simplify
* Type
* Lint
* Update name
* Fix tests
* Catch exceptions in HTTP view
* Lint
* Handle ServiceNotFound in API endpoints that call services
* Type
* Don't crash recorder on non-JSON serializable objects
2018-11-30 21:28:35 +01:00
Paulus Schoutsen
08fe7c3ece
Pytest tests ( #17750 )
...
* Convert core tests
* Convert component tests to use pytest assert
* Lint 🤷♂️
* Fix test
* Fix 3 typos in docs
2018-10-24 12:10:05 +02:00
Anders Melchiorsen
0bf10b0b09
Fire an event when timer gets out of sync ( #17398 )
2018-10-15 11:34:36 +02:00
Anders Melchiorsen
3e0c6c176a
Rework timer delays ( #16650 )
...
* Calibrate timer for each tick
* Return of timer out of sync detection
2018-09-17 10:10:50 +02:00
Anders Melchiorsen
e82e75baf3
Improve precision of timer ticks ( #16598 )
2018-09-14 12:28:09 +02:00
Paulus Schoutsen
06af76404f
Fix invalid state ( #16558 )
...
* Fix invalid state
* Make slightly more efficient in unsubscribing
* Use uuid4"
2018-09-11 21:40:35 +02:00
Ville Skyttä
dbd0763f83
Grammar and spelling fixes ( #16065 )
2018-08-19 22:29:08 +02:00
Paulus Schoutsen
9512bb9587
Add and restore context in recorder ( #15859 )
2018-08-10 18:09:01 +02:00
Paulus Schoutsen
c7f4bdafc0
Context ( #15674 )
...
* Add context
* Add context to switch/light services
* Test set_state API
* Lint
* Fix tests
* Do not include context yet in comparison
* Do not pass in loop
* Fix Z-Wave tests
* Add websocket test without user
2018-07-28 17:53:37 -07:00
Andrey
c2fe0d0120
Make typing checks more strict ( #14429 )
...
## Description:
Make typing checks more strict: add `--strict-optional` flag that forbids implicit None return type. This flag will become default in the next version of mypy (0.600)
Add `homeassistant/util/` to checked dirs.
## Checklist:
- [x] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
2018-07-13 13:24:51 +03:00
Ville Skyttä
234bf1f0ea
Spelling, grammar etc fixes ( #14432 )
...
* Spelling, grammar etc fixes
* s/an api data/data of an api/
2018-05-13 12:09:28 +02:00
Johann Kellerman
507c658fe9
Check whitelisted paths #13107 ( #13154 )
2018-03-29 19:57:19 -07: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
Johann Kellerman
ff83efe376
is_allowed_path: Also unit test folder #12788 #12807 ( #12810 )
2018-03-01 18:55:58 +01:00
Ville Skyttä
cab6c694c5
Flake8 bugbear fixes ( #12072 )
...
* Don't use mutable argument defaults (bugbear B006)
* Use callable(x) instead of hasattr(x, '__call__') (bugbear B004)
* Remove/mark unused loop control variables (bugbear B007)
* Fix stripping protocol from kodi host name (bugbear B005)
* Fix plant daily history add default date (bugbear B008)
2018-01-30 14:44:05 -08:00
Ville Skyttä
55ee8959ba
Spelling fixes ( #11940 )
2018-01-27 11:58:27 -08:00
Paulus Schoutsen
0d06e8c1c9
Test tweaks ( #11560 )
...
* Fix is_allowed_path on OS X
* Move APNS2 inside func in test
2018-01-10 10:48:17 +01:00