Commit Graph

253 Commits (8255bdf3d5e9dc4c45c5ef4f07d7f0a76f7d5845)

Author SHA1 Message Date
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 81701f7e4c
Start safe mode if invalid core conf (#31904) 2020-02-17 10:20:05 -08:00
Ville Skyttä 3018e8ff47
Use time.monotonic instead of time.time where appropriate (#31780) 2020-02-13 22:57:07 +01:00
Christian Clauss df7d2b3aeb
Fix typos found by codespell (#31243)
* 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 (#30723)
* 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 (#30422) 2020-01-03 21:34:20 +01:00
Ville Skyttä e6388e186c
Remove unnecessary string literal concatenations (#30360) 2020-01-02 21:17:10 +02:00
Ville Skyttä 4d57de335c Make Python deprecation notice easier to maintain (#29900) 2019-12-13 10:39:57 +01: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
Paulus Schoutsen 08cc9fd375
Add cloud account linking support (#28210)
* 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 (#27727)
* 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 (#27680) 2019-10-15 10:04:58 +02:00
Paulus Schoutsen 3231e22ddf
Remove direct authentication via trusted networks or API password (#27656)
* 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 (#27226)
https://github.com/home-assistant/architecture/issues/278
2019-10-05 12:20:11 -07:00
Pascal Vizeli 182bf1edef Deprecate Python 3.6.0 (#26575)
* 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 (#26403)
* 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) (#26166) 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 (#25607) 2019-07-31 12:21:15 -07:00
nierob 979f801488 Avoid creating temporary lists (#25317)
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 (#24176)
* 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 (#24177) 2019-05-29 14:30:00 -07:00
Penny Wood b0843f4a38 Ptvsd debugger component. (#23336)
* 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 (#23375) 2019-04-25 05:50:28 -07:00
Jason Hu 308d1fbba0 Rename google/tts.py to google_translate/tts.py (#23090)
* 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 (#23148)
* Add support for after_dependencies

* Remove assert false"

* Fix types
2019-04-16 13:40:21 -07:00
Paulus Schoutsen 6a2da9f9a5
load cleanups (#23112)
* 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(). (#23109) 2019-04-14 19:02:49 -07:00
Paulus Schoutsen 6b0180f753
Fix demo (#23087)
* 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 (#22944)
* Remove introduction component

* Remove more usage
2019-04-09 14:45:09 -07:00
Paulus Schoutsen cac00f5b26 Test for circular dependencies using manifests (#22908)
* 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 (#22321)
* 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 (#22407)
* Move core stuff into Home Assistant integration

* Lint
2019-03-26 13:38:32 +01:00
Penny Wood 62c2bbd59a Fixed typing errors (#22207) 2019-03-20 07:49:27 -07:00
Paulus Schoutsen 92dc26bab3
Always load Hass.io component on Hass.io (#22185)
* 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 (#21884)
* 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 (#21799) 2019-03-08 14:47:10 -08:00
Paulus Schoutsen ee4be13bda Allow config entry reloading (#21502)
* 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 (#21527) 2019-02-28 10:01:10 -08:00
Jason Hu 7bae76843c Add config for trusted networks auth provider (#21111)
* 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 (#20806)
* 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 (#20478)
* 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 (#18884)
* 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" (#16617)
* 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
Ville Skyttä ee696643cd Isort preparations (#16555)
* Don't treat typing as an "in-between" module for import order

That was a < 3.5 era thing.

* Tighten scope of some pylint unused-import disables

To avoid isort moving a top level one around, undesirably broadening its
scope.
2018-09-11 11:21:48 +02:00
Jason Hu 257b8b9b80 Blow up startup if init auth providers or modules failed (#16240)
* Blow up startup if init auth providers or modules failed

* Delete core.entity_registry
2018-08-28 20:54:01 +02:00
Jason Hu 26a485d43c Default load trusted_network auth provider if configured trusted networks (#16184) 2018-08-25 11:09:48 +02:00
Paulus Schoutsen d21d7cef4c
Enable auth by default 🙈 (#16107)
* Enable auth by default

* Only default legacy_api_password if api_password set

* Tweak bool check

* typing
2018-08-23 13:38:08 +02:00