Commit Graph
100 Commits
Author SHA1 Message Date
Jason Hu 1ab03d9e15 Add error handling for migration failure (#23383) 2019-04-26 19:55:26 +00:00
Jason Hu 7e8f2d72b6 Add error handling for migration failure (#23383) 2019-04-25 12:58:10 -07:00
Jason Hu 1128cf576f Remove ghost folder (#23350) 2019-04-24 11:25:02 -07:00
Jason Hu febdb72fb2 Support unicode in configuration migration (#23335) 2019-04-24 11:25:00 -07:00
Jason Hu 843bad83fa Remove ghost folder (#23350) 2019-04-24 09:55:48 -07:00
Jason Hu c61b6cf616 Support unicode in configuration migration (#23335) 2019-04-23 17:47:09 -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
Jason Hu 2f89f88d23 Load component which contains data entry flow handler (#23107)
* Load component which contains data entry flow handler

* Use integration.get_component()

* Add error log
2019-04-14 23:24:47 -07:00
Jason Hu d1398e24be Increase timeout (#23098) 2019-04-14 10:18:45 -07:00
Jason Hu 95662f82d4 Remove validate from aws_config (#23084) 2019-04-14 07:21:47 -07:00
Jason Hu 73a473ac29 Allow aws credential skip validation (#22991)
* Allow aws credential skip validation

* Don't validate the auto-created default profile
2019-04-12 17:19:05 -07:00
Jason Hu ac7f1a7a37 Fix test failed in py35 (#23002) 2019-04-11 12:52:02 -07:00
Jason Hu c82d2cb11c Cherry pick test fix (#22939) 2019-04-09 13:59:15 -07:00
Jason Hu abe85c73ae Fix flaky test (#22850) 2019-04-07 12:42:16 -07:00
Jason Hu 6aac49de7e Remove aws_* notify platforms (#22698) 2019-04-03 20:14:02 -07:00
Jason Hu b30c140648 Require static-check success first for rest of workflow (#22635)
* Require static-check success first

* Update config.yml
2019-04-03 11:27:49 -07:00
Jason Hu 2c10563205 Config CircleCI workflow (#22590)
* Add mypyrc to control typing check, add mypy to circle

* Add translation upload circlci job
2019-04-03 11:27:49 -07:00
Jason Hu 5dd444fcd8 Set up Circleci workflow (#22519)
* Set up Circleci workflow

* Update python tag

* Add pre-test job to cache the requirements

* Upgrade pip itself

* Use 3.7 for lint

* Parallelize pylint

* Tweak run gen_requirements_all

* tweak cache key
2019-04-03 11:27:48 -07:00
Jason Hu 273007fa19 Fix Circleci config (#22509)
* Add libav depends on circleci

* tweak circleci config
2019-04-03 11:27:48 -07:00
Jason Hu 2e8c690033 A very basic Circleci setup (#22503)
* Add circleci support

* Add buildpack-deps

* Install libudev-dev

* sudo

* always run test

* Add test report

* no sugar

* quite pytest

* better junit test result

* Add $CODE_COVERAGE env var
2019-04-03 11:27:47 -07:00
Jason Hu 9eb4f89da4 Fix trusted networks auth provider warning message (#22671)
* Fix trusted networks auth provider warning message

* Update auth.py
2019-04-03 11:25:37 -07:00
Jason Hu b4fc1d77ea Fix trend binary sensor and tests (#22686) 2019-04-03 09:04:30 -07:00
Jason Hu 6a411710df Fix trusted networks auth provider warning message (#22671)
* Fix trusted networks auth provider warning message

* Update auth.py
2019-04-02 21:23:59 -07:00
Jason Hu 5cb69cf163 Add trusted networks deprecating warning (#22487)
* Add trusted networks deprecating warning

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Tweak
2019-04-02 11:41:51 -07:00
Jason Hu d6e2862115 Ignore code coverages for component without test (#22653) 2019-04-02 09:51:44 -07:00
Jason Hu 7646dc00e0 Add codecov (#22649) 2019-04-01 20:31:05 -07:00
Jason Hu 39eaa7fc8d Add trusted networks deprecating warning (#22487)
* Add trusted networks deprecating warning

* Update auth.py

* Update auth.py

* Update auth.py

* Update auth.py

* Tweak
2019-04-01 17:43:29 -07:00
Jason Hu 1e26151069 Require static-check success first for rest of workflow (#22635)
* Require static-check success first

* Update config.yml
2019-04-01 17:42:04 -07:00
Jason Hu de4d1f2c19 Config CircleCI workflow (#22590)
* Add mypyrc to control typing check, add mypy to circle

* Add translation upload circlci job
2019-04-01 07:12:59 -07:00
Jason Hu de16059365 Fix name conflict in tests (#22556)
* Fix name conflict in tests

* Lint

* Lint
2019-03-31 20:01:59 -07:00
Jason Hu 388d614e30 Ignore flaky test (#22563) 2019-03-30 21:10:32 -07:00
Jason Hu 64306922b1 Fix name conflict in tests (#22556)
* Fix name conflict in tests

* Lint

* Lint
2019-03-30 08:30:21 -07:00
Jason Hu e81e5ea796 Set up Circleci workflow (#22519)
* Set up Circleci workflow

* Update python tag

* Add pre-test job to cache the requirements

* Upgrade pip itself

* Use 3.7 for lint

* Parallelize pylint

* Tweak run gen_requirements_all

* tweak cache key
2019-03-29 16:37:45 -07:00
Jason Hu ab642ca4eb Fix tts Great Migration issue (#22539) 2019-03-29 14:07:16 -07:00
Jason Hu 9f72764cff Fix lint on dev (#22512)
## Description:

Fix a lint issue in credstash script.


**Related issue (if applicable):** fixes #<home-assistant issue number goes here>

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

## Example entry for `configuration.yaml` (if applicable):
```yaml

```

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [ ] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [ ] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [ ] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [ ] New files were added to `.coveragerc`.

If the code does not interact with devices:
  - [ ] Tests have been added to verify that the new code works.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
2019-03-29 14:07:14 -07:00
Jason Hu 77f7a53d9f Remove botocore dependency from credstash script (#22511)
* Remove botocore dependency from credstash script

* Update requirements_all.txt

* Update pylintrc

* Update credstash.py
2019-03-29 14:07:13 -07:00
Jason Hu 21917f4dc4 Fix dev branch (#22493) 2019-03-29 14:07:12 -07:00
Jason Hu c31ab7a175 Fix tts Great Migration issue (#22539) 2019-03-29 11:45:02 -07:00
Jason Hu 709419e465 Fix lint on dev (#22512)
## Description:

Fix a lint issue in credstash script.


**Related issue (if applicable):** fixes #<home-assistant issue number goes here>

**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

## Example entry for `configuration.yaml` (if applicable):
```yaml

```

## Checklist:
  - [ ] The code change is tested and works locally.
  - [ ] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
  - [ ] There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:
  - [ ] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)

If the code communicates with devices, web services, or third-party tools:
  - [ ] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).
  - [ ] New dependencies are only imported inside functions that use them ([example][ex-import]).
  - [ ] New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
  - [ ] New files were added to `.coveragerc`.

If the code does not interact with devices:
  - [ ] Tests have been added to verify that the new code works.

[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
2019-03-28 15:33:21 -07:00
Jason Hu 821a90fa54 Remove botocore dependency from credstash script (#22511)
* Remove botocore dependency from credstash script

* Update requirements_all.txt

* Update pylintrc

* Update credstash.py
2019-03-28 14:37:44 -07:00
Jason Hu 8874422e8a Fix Circleci config (#22509)
* Add libav depends on circleci

* tweak circleci config
2019-03-28 14:37:10 -07:00
Jason Hu 59476ab475 A very basic Circleci setup (#22503)
* Add circleci support

* Add buildpack-deps

* Install libudev-dev

* sudo

* always run test

* Add test report

* no sugar

* quite pytest

* better junit test result

* Add $CODE_COVERAGE env var
2019-03-28 09:54:49 -07:00
Jason Hu 8d86722c0e Fix dev branch (#22493) 2019-03-28 11:09:12 +01:00
Jason Hu 6ba2891604 Add trusted_users in trusted networks auth provider (#22478) 2019-03-27 21:53:11 -07:00
Jason Hu f795d03503 Fix aws.notify platform schema (#22374)
* Fix aws component notify platform schema

* Address code review comment

* Do not allow load aws.notify from notify component

* Revert unrelated translation update

* Review comment
2019-03-27 14:53:06 -07:00
Jason Hu 7519e8d417 Update translate, fix dev build error (#22419) 2019-03-26 07:48:26 -07:00
Jason Hu e85b089eff Set default parallel_update value should base on async_update (#22149)
* Set default parallel_update value should base on async_update

* Set default parallel_update value should base on async_update

* Delay the parallel_update_semaphore creation

* Remove outdated comment
2019-03-25 23:53:36 -07:00
Jason Hu 1aee7a1673 Add aws component and consolidate aws notify platform (#22240)
* Add aws component

* Move notify config under aws component

* Add basic tests for aws component

* Add deprecated warning for notify.aws_*

* Add more tests
2019-03-24 17:58:20 -07:00
Jason Hu 2b02c0d0fc Fix build issue (#22251) 2019-03-21 07:32:13 -07:00
Jason Hu 22624715a9 Remove hass.config from aws_lambda notify payload (#22125) 2019-03-18 17:04:38 -07:00
Jason Hu 1aab551eed Remove hass.config from aws_lambda notify payload (#22125) 2019-03-17 11:42:49 +01:00
Jason Hu 3ec8b5a170 Correct context (#22061) 2019-03-15 10:59:26 -07:00
Jason Hu cf69f25354 Correct context (#22061) 2019-03-15 10:01:15 -07:00
Jason Hu 7057958e3e Fix lifx light async error (#22031) 2019-03-14 16:19:19 -07:00
Jason Hu e480f75d6d Fix lifx light async error (#22031) 2019-03-14 17:10:36 +01:00
Jason Hu 4ff8a46acf Upgrade prefetched tox env to py37 (#22029) 2019-03-14 13:09:32 +01:00
Jason Hu e5da7a0014 Add breaking change section to PR template (#21994) 2019-03-13 10:54:30 +01:00
Jason Hu 1b4905ae5a Override http.trusted_networks by auth_provider.trusted_networks (#21844) 2019-03-12 11:51:00 -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 226be65910 Only commit if need. (#21848) 2019-03-09 12:04:13 -08:00
Jason Hu bbd01968ba Override http.trusted_networks by auth_provider.trusted_networks (#21844) 2019-03-08 23:56:37 -08:00
Jason Hu 3d8673dbf8 Resolve auth_store loading race condition (#21794)
* Add lock in auth_store._async_load()

* Python 3.5 does not like assert_called_once()
2019-03-08 14:50:24 -08:00
Jason Hu 3ff2d99cd6 Load logger and system_log components as soon as possible (#21799) 2019-03-08 14:47:10 -08:00
Jason Hu c031fd4164 Fix script load module issue (#21763)
* Fix script load depedency

* Revert #21754
2019-03-07 16:48:45 -08:00
Jason Hu 78a806bc5c Fix script load module issue (#21763)
* Fix script load depedency

* Revert #21754
2019-03-07 16:48:14 -08:00
Jason Hu 5f0c37ccfc Fix colorlog import error (#21754)
* Fix colorlog import error

* Lint
2019-03-07 11:07:24 -08:00
Jason Hu c91fb82807 Fix colorlog import error (#21754)
* Fix colorlog import error

* Lint
2019-03-07 11:07:07 -08:00
Jason Hu ba70459e1e Remove pytest warning message (#21713) 2019-03-07 16:59:15 +05:30
Jason Hu 38a93afa66 Make pytest in tox quite (#21727) 2019-03-06 22:27:46 -08:00
Jason Hu a85119ac09 Fix pylint warning on python 3.7 (#21714) 2019-03-07 06:47:56 +01:00
Jason Hu d5bdfdb0b3 Resolve race condition when HA auth provider is loading (#21619)
* Resolve race condition when HA auth provider is loading

* Fix

* Add more tests

* Lint
2019-03-04 15:59:17 -08:00
Jason Hu c5dad82211 Log exception occurred in WS service call command (#21584) 2019-03-04 15:59:15 -08:00
Jason Hu a268aab2ec Re-thrown exception occurred in the blocking service call (#21573)
* Rethrown exception occurred in the actual service call

* Fix lint and test
2019-03-04 15:59:14 -08:00
Jason Hu 4a3b4cf346 Resolve race condition when HA auth provider is loading (#21619)
* Resolve race condition when HA auth provider is loading

* Fix

* Add more tests

* Lint
2019-03-04 15:55:26 -08:00
Jason Hu ee6f09dd29 Log exception occurred in WS service call command (#21584) 2019-03-03 21:22:22 -08: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
Jason Hu 97b93bcf7b Fix warning (#21538) 2019-02-28 17:46:31 -08:00
Jason Hu eda2290d47 Allow skip-pip applied to HA core (#21527) 2019-02-28 17:46:30 -08:00
Jason Hu b18b1cffff Fix warning (#21538) 2019-02-28 10:10:21 -08: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
Jason Hu 2155a861cd Remove outdated url pattern match support for static file hosting (#21109) 2019-02-16 23:06:42 -08:00
Jason Hu 46efc0eafb Refactor http CachingStaticResource (#21062)
* Simplify http.CachingStaticResource implementation

* Sync up CachingStaticResource._handle() implementation from aiohttp

* Ignore pylint duplicate-base warning

* Try to disable pylint for http/static.py

Caused by https://github.com/PyCQA/astroid/issues/633#issuecomment-463879288

* Remove pylint ignore

* Ignore pylint duplicate-base warning
2019-02-15 09:31:54 -08:00
Jason Hu 6b46ed850b Upgrade cryptography to 2.5 (#21011) 2019-02-12 19:52:24 +01:00
Jason Hu 8137b0bb9e Fix coroutine never awaited warning in test (#20892) 2019-02-09 15:13:12 -06:00
Jason Hu a8b4467763 Fix the line reference in config error message (#20743)
* Fix the line reference in config error message

* Fix platform config validation

* Fix test

* Handle error in error handling routine
2019-02-04 22:01:50 -08:00
Jason Hu 207a050dba Fix ffmpeg v4 stream issue (#20314)
* Add ffmpeg version

* Add ffmpeg stream content type

* Change ffmpeg camera stream content type

* Change ffmpeg stream content type

* Lint

* Add a none guard

* Fix

* Fix

* Update onvif.py

* Fix version match regrex

* Fix regrex

* Upgrade ha-ffmpeg to 1.11

* Lint

* Get ffmpeg version in ffmpeg component setup
2019-02-04 22:01:47 -08:00
Jason Hu c812176e94 Fix the line reference in config error message (#20743)
* 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
Jason Hu 7455d950b1 Fix ffmpeg v4 stream issue (#20314)
* Add ffmpeg version

* Add ffmpeg stream content type

* Change ffmpeg camera stream content type

* Change ffmpeg stream content type

* Lint

* Add a none guard

* Fix

* Fix

* Update onvif.py

* Fix version match regrex

* Fix regrex

* Upgrade ha-ffmpeg to 1.11

* Lint

* Get ffmpeg version in ffmpeg component setup
2019-02-04 09:57:22 -08:00
Jason Hu d7b61f7ff6 Move mqtt_mock to tests/components/mqtt/conftest.py (#20621)
* Move mqtt_mock to tests/components/mqtt/conftest.py

* Move mqtt room presence sensor test to tests/components/mqtt

* Revert "Move mqtt room presence sensor test to tests/components/mqtt"

This reverts commit e08bc143

* Decouple mqtt room presence sensor test and mqtt_mock
2019-01-31 21:22:29 +01:00
Jason Hu f84c0ee473 Upgrade python-nest to 4.1.0 (#20313) 2019-01-22 13:23:33 +01:00
Jason Hu 97394df0b9 Only authenticate request when owner can be found 2019-01-11 00:26:25 -08:00
Jason Hu 4d5338a1b0 Fix google assistant request sync service call (#17415)
* Update __init__.py

* Add optional agent_user_id field to request_sync service

* Update services.yaml
2018-11-27 14:57:42 +01:00
Jason Hu 602b59aed8 Change cv.string to [cv.string] (#18050) 2018-11-02 12:31:58 +01:00
Jason Hu f516550f9f Fix camera mjpeg stream handling (#18076)
* Fix handle_async_mjpeg_stream

* Lint
2018-11-01 09:28:23 +01:00
Jason Hu 1578187376 Change cv.string to [cv.string] (#18050) 2018-10-31 12:52:21 +01:00
Jason Hu b61a250321 Fix upnp component l10n error (#17132) 2018-10-04 15:50:42 +02:00
Jason Hu 2feab82396 Use Protractor loop in Windows (#17061)
* Use Protractor loop in Windows

* Add import sys
2018-10-02 09:56:53 +02:00
Jason Hu 1667481342 Use Protractor loop in Windows (#17061)
* Use Protractor loop in Windows

* Add import sys
2018-10-02 09:21:02 +02:00
Jason Hu 32d652884b Override unique_id of NestActivityZoneSensor (#16961) 2018-09-30 10:22:41 +02:00