Skip to content

Commit

Permalink
Add config flow to iCloud (#28968)
Browse files Browse the repository at this point in the history
* iCloud: setup ConfigFlow and prepare for more platforms

- add config flow + tests
- fix existing services
- add play_sound & display_message services
- document services
- can use devices with the same name
- prepare to add sensor platform

* Review : not copy account conf

* Review: Safer test patch

* Review: remove reset_account

* Review: Use executor_job while IO

* Review: Use executor_job while IO 2

* Review: use hass.helpers.storage.Store()

* Review: no IO in tests

* Remove reset from services.yaml

* Review: remove authenticate.return_value = Mock()

* Review: do not initialize the api with the mocked service

* isort

* Review: @MartinHjelmare Test config flow with all steps

* Review: Fix failed tests names

* Codevov: Add one missing test
  • Loading branch information
Quentame authored and MartinHjelmare committed Dec 9, 2019
1 parent f60125b commit c804f8f
Show file tree
Hide file tree
Showing 14 changed files with 1,463 additions and 556 deletions.
3 changes: 2 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ omit =
homeassistant/components/iaqualink/light.py
homeassistant/components/iaqualink/sensor.py
homeassistant/components/iaqualink/switch.py
homeassistant/components/icloud/*
homeassistant/components/icloud/__init__.py
homeassistant/components/icloud/device_tracker.py
homeassistant/components/izone/climate.py
homeassistant/components/izone/discovery.py
homeassistant/components/izone/__init__.py
Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ homeassistant/components/huawei_lte/* @scop
homeassistant/components/huawei_router/* @abmantis
homeassistant/components/hue/* @balloob
homeassistant/components/iaqualink/* @flz
homeassistant/components/icloud/* @Quentame
homeassistant/components/ign_sismologia/* @exxamalte
homeassistant/components/incomfort/* @zxdavb
homeassistant/components/influxdb/* @fabaff
Expand Down
38 changes: 38 additions & 0 deletions homeassistant/components/icloud/.translations/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"config": {
"abort": {
"username_exists": "Account already configured"
},
"error": {
"login": "Login error: please check your email & password",
"send_verification_code": "Failed to send verification code",
"username_exists": "Account already configured",
"validate_verification_code": "Failed to verify your verification code, choose a trust device and start the verification again"
},
"step": {
"trusted_device": {
"data": {
"trusted_device": "Trusted device"
},
"description": "Select your trusted device",
"title": "iCloud trusted device"
},
"user": {
"data": {
"password": "Password",
"username": "Email"
},
"description": "Enter your credentials",
"title": "iCloud credentials"
},
"verification_code": {
"data": {
"verification_code": "Verification code"
},
"description": "Please enter the verification code you just received from iCloud",
"title": "iCloud verification code"
}
},
"title": "Apple iCloud"
}
}
Loading

0 comments on commit c804f8f

Please sign in to comment.