Commit graph

307 commits

Author SHA1 Message Date
Franck Nijhof
b9b1cee403
Enable pylint import-outside-toplevel () 2020-04-04 17:07:36 +02:00
Ziv
4dbbf93af9
Replace asyncio.wait with asyncio.gather since wait ignores exceptions ()
* replace asyncio.wait with asyncio.gather since wait ignores exceptions
fix for test_entity_platform so it expects the exception

* changed to log on failed domains

* discovered that this fix actually removes other uncaught exceptions

* fix in the list of ignored exceptions

* replaced a few ignores on dyson tests that work locally but fail in the CI

* two more tests that are failing on the CI and not locally

* removed assertion on multiple entries with same unique_id - replaced with log and return
reverted test_entity_platform to its original since now there is no exception thrown

* entered all the dyson tests. they all pass locally and probabilistically fail in the CI

* removed unnecessary str() for exception

* added log message for duplicate entity_id / unique_id

* removed log in case of False return value

* added exc_info

* change the use of exc_info
2020-04-01 07:09:13 -07:00
Ville Skyttä
e86919a997
Type hint improvements () 2020-03-14 11:39:28 +01:00
Paulus Schoutsen
4e765398cc
Only check frontend for safe mode if frontend wanted to be loa… ()
* Only check frontend for safe mode if frontend wanted to be loaded

* Update test
2020-02-19 15:56:46 +01:00
Paulus Schoutsen
beee1298c5
Extend safe mode ()
* 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
81701f7e4c
Start safe mode if invalid core conf () 2020-02-17 10:20:05 -08:00
Ville Skyttä
3018e8ff47
Use time.monotonic instead of time.time where appropriate () 2020-02-13 22:57:07 +01:00
Christian Clauss
df7d2b3aeb
Fix typos found by codespell ()
* Fix typos found by codespell

* Fix typos found by codespell

* codespell: Furture  ==> Future

* Update test_config_flow.py

* Update __init__.py

* Spellcheck: successfull  ==> successful

* Codespell: unsuccesful  ==> unsuccessful

* Codespell: cant  ==> can't

* Codespell: firware ==> firmware

* Codespell: mimick  ==> mimic
2020-01-31 08:33:00 -08:00
Paulus Schoutsen
5fdc60e067
Add Safe Mode ()
* Store last working HTTP settings

* Add safe mode

* Fix tests

* Add cloud to safe mode

* Update logging text

* Fix camera tests leaving files behind

* Make emulated_hue tests not leave files behind

* Make logbook tests not leave files behind

* Make tts tests not leave files behind

* Make image_processing tests not leave files behind

* Make manual_mqtt tests not leave files behind
2020-01-14 13:03:02 -08:00
David Cramer
3033dbd86c Add Sentry component () 2020-01-03 21:34:20 +01:00
Ville Skyttä
e6388e186c
Remove unnecessary string literal concatenations () 2020-01-02 21:17:10 +02:00
Ville Skyttä
4d57de335c Make Python deprecation notice easier to maintain () 2019-12-13 10:39:57 +01:00
Bas Nijholt
67c56c860d Sort imports according to PEP8 for 'homeassistant' folder ()
Components are already done
2019-12-09 16:42:10 +01:00
Paulus Schoutsen
08cc9fd375
Add cloud account linking support ()
* Add cloud account linking support

* Update account_link.py
2019-10-25 16:04:24 -07:00
Paulus Schoutsen
b6c26cb363
Introduce new OAuth2 config flow helper ()
* Refactor the Somfy auth implementation

* Typing

* Migrate Somfy to OAuth2 flow helper

* Add tests

* Add more tests

* Fix tests

* Fix type error

* More tests

* Remove side effect from constructor

* implementation -> auth_implementation

* Make get_implementation async

* Minor cleanup + Allow picking implementations.

* Add support for extra authorize data
2019-10-18 13:06:33 -07:00
Ville Skyttä
68a3c97464 Deprecate Python 3.6 support, 3.8.0 is out () 2019-10-15 10:04:58 +02:00
Paulus Schoutsen
3231e22ddf
Remove direct authentication via trusted networks or API password ()
* Remove direct authentication via trusted networks and API password

* Fix tests
2019-10-14 14:56:45 -07:00
Ville Skyttä
25bfdbc8df Require Python >= 3.6.1 ()
https://github.com/home-assistant/architecture/issues/278
2019-10-05 12:20:11 -07:00
Pascal Vizeli
182bf1edef Deprecate Python 3.6.0 ()
* Deprecate Python 3.6.1

* Update msg
2019-09-11 12:42:54 -06:00
Franck Nijhof
2f0eb07624 Migrate legacy typehints in core to PEP-526 ()
* Migrate legacy typehints in core to PEP-526

* Fix one type
2019-09-03 20:36:04 -07:00
Franck Nijhof
decf13b948 Use literal string interpolation in core (f-strings) () 2019-08-23 09:53:33 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Ville Skyttä
3cf8964c06 Python < 3.6 remainder cleanups () 2019-07-31 12:21:15 -07:00
nierob
979f801488 Avoid creating temporary lists ()
That gives nano performance improvements as *() is slightly faster
then *[].
2019-07-19 13:36:18 -07:00
Paulus Schoutsen
59ce31f44f No longer allow invalid slugs or extra keys ()
* No longer allow slugs

* Lint

* Remove HASchema

* Lint

* Fix tests
2019-05-30 13:33:26 +02:00
Paulus Schoutsen
e3307213b1
Deprecate Python 3.5.3 () 2019-05-29 14:30:00 -07:00
Penny Wood
b0843f4a38 Ptvsd debugger component. ()
* ptvsd debugger component.

* Add test case

* ptvsd as test dependency

* Fix for 3.5

* Fixed bootstrap test

* Use dict direct lookup.

* Don't need to load dependencies.

* Get the test working.

* 3.5 fix

* Set mock return value

* Put tests back, but skip them

* Change log level
2019-05-01 00:07:34 +02:00
Chuang Zheng
3d91d76d3d async_setup_component stage_1_domains () 2019-04-25 05:50:28 -07:00
Jason Hu
308d1fbba0 Rename google/tts.py to google_translate/tts.py ()
* Rename google/tts.py to google_translate/tts.py

* Move config migration before load config file

Migrate default config google tts to google_translate tts

* Revert change in process component config

* Fix tests
2019-04-16 14:27:07 -07:00
Paulus Schoutsen
10e8f4f70a
Add support for after_dependencies ()
* Add support for after_dependencies

* Remove assert false"

* Fix types
2019-04-16 13:40:21 -07:00
Paulus Schoutsen
6a2da9f9a5
load cleanups ()
* load cleanups

* Remove unused methods

* Allow importing requirements at the top of a file

* Fix test

* Lint

* Install reqs ASAP when loading platforms
2019-04-15 16:45:46 -07:00
Alexei Chetroi
930f75220c Await merge_packages_config(). () 2019-04-14 19:02:49 -07:00
Paulus Schoutsen
6b0180f753
Fix demo ()
* Fix demo

* Fix types

* Fix all the things

* Fix type

* Fix test

* Lint
2019-04-14 16:59:06 -07:00
Paulus Schoutsen
8582e390f8 Remove introduction component ()
* Remove introduction component

* Remove more usage
2019-04-09 14:45:09 -07:00
Paulus Schoutsen
cac00f5b26 Test for circular dependencies using manifests ()
* Integration dependencies

* Lint

* Lint

* Fix one test

* Lint

* Fix load custom component integration

Fix async issue
Add circular dependency detection in manifest validation

* Fix test

* Address review comment

* Apply suggestions from code review

Co-Authored-By: balloob <paulus@home-assistant.io>
2019-04-09 09:30:32 -07:00
Penny Wood
646c4a7137
Bootstrap to start registry loading early ()
* Registries store directly in data on loading.

* Loading registries concurent with stage 1.

* Removed comments
2019-03-27 22:06:20 +08:00
Paulus Schoutsen
65432ba552 Move core stuff into Home Assistant integration ()
* Move core stuff into Home Assistant integration

* Lint
2019-03-26 13:38:32 +01:00
Penny Wood
62c2bbd59a Fixed typing errors () 2019-03-20 07:49:27 -07:00
Paulus Schoutsen
92dc26bab3
Always load Hass.io component on Hass.io ()
* Always load Hass.io component on Hass.io

* Lint

* Lint
2019-03-19 11:33:50 -07:00
Jason Hu
fe1840f901 Deprecate http.api_password ()
* Deprecated http.api_password

* Deprecated ApiConfig.api_password

GitHub Drafted PR would trigger CI after changed it to normal PR.
I have to commit a comment change to trigger it

* Trigger CI

* Adjust if- elif chain in auth middleware
2019-03-10 19:55:36 -07:00
Jason Hu
3ff2d99cd6 Load logger and system_log components as soon as possible () 2019-03-08 14:47:10 -08:00
Paulus Schoutsen
ee4be13bda Allow config entry reloading ()
* Allow config entry reloading

* Fix duplicate test name

* Add comment

* fix typing
2019-02-28 22:27:20 -06:00
Jason Hu
5ce4fe65b2 Allow skip-pip applied to HA core () 2019-02-28 10:01:10 -08:00
Jason Hu
7bae76843c Add config for trusted networks auth provider ()
* Add config for trusted networks auth provider

* Lint

* Fix typing

* Fix pylint

* Fix lint

* Add some log information

* Add http.trusted_networks deprecated warning

* Remove log info

* Lint
2019-02-26 14:42:48 -08:00
Otto Winter
a49686879d
Update bootstrap.py 2019-02-16 14:51:30 +01:00
Otto Winter
06f2aa93a4
Add persistent notification 2019-02-15 18:40:46 +01:00
Paulus Schoutsen
a9672b0d52 Load as many components in parallel as possible ()
* Load as many components in parallel as possible

* Lint
2019-02-07 22:56:40 +01:00
Paulus Schoutsen
87316c4e83
Warn for old slugs/entity ids ()
* Warn for old slugs/entity ids

* add comments

* Lint

* LInt

* Lint

* Lint
2019-01-26 14:09:41 -08:00
cdce8p
3904d83c32 Extend partial reload to include packages ()
* Merge packages after partial reload

* Remove merge from core reload & test

* Integrate merge in 'async_hass_config_yaml'

* Merge executors
2018-12-03 10:56:26 +01:00
Matthias Urlichs
0121e3cb04 Remove usage of "run_until_complete" ()
* De-run_forever()-ization

* Use asyncio.run (or our own implementation on Python <3.7)
* hass.start is only used by tests
* setup_and_run_hass() is now async
* Add "main" async hass.run method
* move SIGINT handling to helpers/signal.py
  * add flag to .run to disable hass's signal handlers
* Teach async_start and async_stop to not step on each other
  (more than necessary)

* shorten over-long lines

* restore missing "import asyncio"

* move run_asyncio to homeassistant.util.async_

* LOGGER: warn => warning

* Add "force" flag to async_stop

only useful for testing

* Add 'attrs==18.2.0' to requirements_all.txt

Required for keeping requirements_test_all.txt in sync, where it is in
turn required to prevent auto-downgrading "attrs" during "pip install"

* Fixes for mypy

* Fix "mock_signal" fixture

* Revert mistaken edit

* Flake8 fixes

* mypy fixes

* pylint fix

* Revert adding attrs== to requirements_test*.txt

solved by using "pip -c"

* Rename "run" to "async_run", as per calling conventions
2018-09-19 15:40:02 +02:00