Commit graph

231 commits

Author SHA1 Message Date
Paulus Schoutsen
6667138b73
Remove discovery from initial config () 2019-05-29 15:32:36 -07:00
Paulus Schoutsen
9e96397e6a
Require core config detection to be triggerd manually ()
* 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 ()
* Fire event when core config is updated
2019-05-20 20:02:36 +02:00
Paulus Schoutsen
e356d0bcda
Better handle file not found when loading YAML ()
* Better handle file not found

* Lint
2019-05-19 12:01:29 +02:00
Erik Montnemery
c2fc8a0d61 Load HA core config from storage ()
* 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
Paulus Schoutsen
70ed58a78d
Restructure device tracker ()
* Restructure device tracker

* Docstyle

* Fix typing

* Lint

* Lint

* Fix tests
2019-05-15 23:43:45 +02:00
Paulus Schoutsen
b8f6d824fd
Catch import error when processing config () 2019-05-12 23:54:55 -07:00
Paulus Schoutsen
cc13713abd
No longer rely on requests ()
* No longer rely on requests

* Lint

* Missed a few parts

* Fix types

* Fix more types

* Update __main__.py

* Fix tests

* Lint

* Fix script
2019-05-08 11:15:04 -07:00
Jason Hu
7e8f2d72b6 Add error handling for migration failure () 2019-04-25 12:58:10 -07:00
Jason Hu
c61b6cf616 Support unicode in configuration migration () 2019-04-23 17:47:09 -07:00
Paulus Schoutsen
37ca9cabd1 Fix check config script ()
* Fix check config script

* Fix typings

* Fix test
2019-04-16 17:14:25 -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
3368e30279
Migrate packages and check config ()
* Migrate packages and check config

* Fix typing

* Fix check config script
2019-04-14 07:23:01 -07:00
Paulus Schoutsen
8582e390f8 Remove introduction component ()
* Remove introduction component

* Remove more usage
2019-04-09 14:45:09 -07:00
Robbie Trencheny
95da6d41f9
Mobile App: Discovery to default configuration.yaml, zeroconf to default_config ()
* Move discovery into default configuration.yaml

* Add zeroconf to default_config
2019-03-13 22:05:56 -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
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
Paulus Schoutsen
e59240fa00
Add default_config component ()
* Add default config component

* Add default_config to default config

* Fix comments
2019-02-07 20:07:15 -08:00
Jason Hu
c812176e94 Fix the line reference in config error message ()
* Fix the line reference in config error message

* Fix platform config validation

* Fix test

* Handle error in error handling routine
2019-02-04 10:58:06 -08:00
Paulus Schoutsen
cb07ea0d60
RFC: Add system health component ()
* Add system health component

* Remove stale comment

* Fix confusing syntax

* Update test_init.py

* Address comments

* Lint

* Move distro check to updater

* Convert to websocket

* Lint

* Make info callback async

* Fix tests

* Fix tests

* Lint

* Catch exceptions
2019-01-30 10:57:53 -08:00
emontnemery
d7ba2aad1d Add COMPONENT_SCHEMA and use it in alarm_control_panel ()
* Add COMPONENT_SCHEMA and use in alarm and mqtt

* Revert MQTT changes

* Lint

* Small tweak

* Add tests

* Rename COMPONENT_SCHEMA to PLATFORM_SCHEMA_BASE

* Fix tests

* Improve tests
2019-01-28 16:14:55 -08:00
Johann Kellerman
c36c708068 Align valid_entity_id with new slugify ()
* slug

* ensure a dot

* fix

* schema_with_slug_keys

* lint

* test
2019-01-21 09:45:11 -08:00
Ville Skyttä
1be440a72b Upgrade pylint to 2.2.2 ()
* Upgrade to 2.2.0

* simplifiable-if-expression fixes

* duplicate-string-formatting-argument fixes

* unused-import fixes

* Upgrade to 2.2.1

* Remove no longer needed disable

* Upgrade to 2.2.2
2018-12-06 11:54:44 +01: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
Ville Skyttä
4d9ef9e795
Import homeassistant domain instead of hardcoding it () 2018-10-30 17:38:09 +02:00
Ville Skyttä
15f4ed74ac Tweak sensors comments in default config ()
Makes it more clear that there should be only one sensors section, and
that the weather prediction comment applies only to the yr platform.
2018-10-17 09:58:41 +02:00
Jason Hu
7a77951bb4 Add Notify MFA module ()
* Add Notify MFA

* Fix unit test

* Address review comment, change storage implementation

* Add retry limit to mfa module

* Fix loading

* Fix invalaid login log processing

* Typing

* Change default message template

* Change one-time password to 8 digit

* Refactoring to not save secret

* Bug fixing

* Change async_initialize method name to aysnc_initialize_login_mfa_step

* Address some simple fix code review comment
2018-09-24 11:06:50 +02:00
Thomas Lovén
ad47ece5c6 Allow split component definitions in packages ()
* Allow split component definitions in packages

Two different configuration styles are described in
https://www.home-assistant.io/docs/configuration/devices/#style-2-list-each-device-separately

But only one is allowed in packages according to
https://www.home-assistant.io/docs/configuration/packages/

This change allows "Style 2" configuration in packages.

* Added test for split component definition in packages
2018-09-24 10:17:24 +02:00
Ville Skyttä
ee696643cd Isort preparations ()
* 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 ()
* Blow up startup if init auth providers or modules failed

* Delete core.entity_registry
2018-08-28 20:54:01 +02:00
Jason Hu
47755fb1e9 Add Time-based Onetime Password Multi-factor Authentication Module ()
* Add Time-based Onetime Password Multi-factor Auth

Add TOTP setup flow, generate QR code

* Resolve rebase issue

* Use svg instead png for QR code

* Lint and typing

* Fix translation

* Load totp auth module by default

* use <svg> tag instead markdown image

* Update strings

* Cleanup
2018-08-26 22:38:52 +02:00
Jason Hu
26a485d43c Default load trusted_network auth provider if configured trusted networks () 2018-08-25 11:09:48 +02:00
Paulus Schoutsen
156c6e2025
Remove commented out API password from default config () 2018-08-23 22:16:31 +02:00
Paulus Schoutsen
d21d7cef4c
Enable auth by default 🙈 ()
* 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
Jason Hu
7e7f9bc6ac Add multi-factor authentication modules ()
* Get user after login flow finished

* Add multi factor authentication support

* Typings
2018-08-22 09:52:34 +02:00
Andrey
140a874917 Add typing to homeassistant/*.py and homeassistant/util/ ()
* Add typing to homeassistant/*.py and homeassistant/util/

* Fix wrong merge

* Restore iterable in OrderedSet

* Fix tests
2018-07-23 10:24:39 +02:00
Ville Skyttä
b7c336a687 Pylint cleanups ()
* Pylint 2 no-else-return fixes

* Remove unneeded abstract-class-not-used pylint disable
2018-07-23 10:16:05 +02:00
Andrey
24d2261060 Add check_untyped_defs ()
* Add check_untyped_defs

* Change to regular if-else
2018-07-18 00:28:44 +02:00
Jason Hu
2022d39339 Disallow use insecure_example auth provider in configuration.yml ()
* Disallow use insecure_example auth provider in configuration.yml

* Add unit test for auth provider config validate
2018-07-17 19:36:33 +02:00
Andrey
e60f9ca392
More typing ()
## Description:

More typing improvements.

Switch to using `mypy.ini` for flexibility

Add `warn_return_any` check except in `homeassistant.util.yaml` that does typing hacks. Fix some type annotations as resulting from this check and ignore others were fixing is hard.

## 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 20:14:45 +03:00
Paulus Schoutsen
b6ca03ce47
Reorg auth () 2018-07-13 11:43:08 +02:00
Ville Skyttä
6f582dcf24 Lint cleanups ()
* Remove some unused imports

* Fix a flake8 E271
2018-07-01 11:57:01 -04:00
cdce8p
7d9bce2153 Fix extended package support ()
* Fix package recurive merge bug

* Fixed extended package support
2018-06-16 06:55:32 -04:00
cdce8p
6ceafabd78 Extend package support () 2018-05-25 16:41:50 -04:00
Andrey
7aec098a05 Bring back typing check. Meanwhile just for homeassistant/*.py ()
* Bring back typing check. Meanwhile just for homeassistant/.py

* Change follow-imports to silent. Add a few more checks.
2018-05-12 17:44:53 -04:00
Boyi C
c80b752d0e fix check config not working after () 2018-05-04 12:29:07 +02:00
Paulus Schoutsen
83d300fd11 Custom component loading cleanup ()
* Clean up custom component loading

* Fix some tests

* Fix some stuff

* Make imports work again

* Fix tests

* Remove debug print

* Lint
2018-05-01 20:57:30 +02:00
Paulus Schoutsen
cdd45e7878 Foundation for users ()
* Add initial user foundation to Home Assistant

* Address comments

* Address comments

* Allow non-ascii passwords

* One more utf-8 hmac compare digest

* Add new line
2018-05-01 18:20:41 +02:00
Johann Kellerman
a6b63b669e Don't add Falsy items to list () 2018-03-29 17:13:08 -07:00
cdce8p
8a0facb747 Validate basic customize entries ()
* Added schema to validate customize dictionary

* Added test
2018-03-26 19:50:29 -07:00