Skip to content

Commit

Permalink
Bump Python API and add translation support for options (#8)
Browse files Browse the repository at this point in the history
* Bump API to 1.0.4

* Update string.json for options
  • Loading branch information
iMicknl authored Apr 9, 2021
1 parent 36d0b20 commit bfc3676
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 19 deletions.
6 changes: 3 additions & 3 deletions custom_components/sagemcom_fast/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"domain": "sagemcom_fast",
"name": "Sagemcom F@st",
"version": "0.2.0",
"version": "0.2.1",
"config_flow": true,
"documentation": "https://github.com/imicknl/ha-sagemcom-fast",
"requirements": [
"sagemcom_api===1.0.3"
"sagemcom_api===1.0.4"
],
"ssdp": [
{
Expand All @@ -23,4 +23,4 @@
"codeowners": [
"@imicknl"
]
}
}
21 changes: 10 additions & 11 deletions custom_components/sagemcom_fast/strings.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"config": {
"abort": {
"already_configured": "Device is already configured"
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
},
"error": {
"access_restricted": "Access restricted",
"cannot_connect": "Failed to connect, please try again",
"invalid_auth": "Invalid authentication",
"unknown": "Unexpected error",
"login_timeout": "Request timed-out. This is mainly caused by selection of the wrong encryption method."
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
"unknown": "[%key:common::config_flow::error::unknown%]",
"login_timeout": "Request timed-out. This is mainly caused by selection of the wrong encryption method"
},
"step": {
"user": {
"data": {
"host": "Host",
"password": "Password",
"username": "Username",
"host": "[%key:common::config_flow::data::host%]",
"password": "[%key:common::config_flow::data::password%]",
"username": "[%key:common::config_flow::data::username%]",
"encryption_method": "Encryption Method"
},
"description": "Enter your credentials for accessing the routers web interface. Depending on the router model, Sagemcom is using different encryption methods for authentication, which can be found in the [supported devices](https://github.com/iMicknl/ha-sagemcom-fast#supported-devices) list."
Expand All @@ -24,11 +24,10 @@
},
"options": {
"step": {
"simple_options": {
"init": {
"title": "Options",
"data": {
"track_wireless_clients": "Show devices connected via WiFi",
"track_wired_clients": "Show devices connected via cable"
"update_interval": "Update interval (in seconds)"
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions custom_components/sagemcom_fast/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"cannot_connect": "Failed to connect, please try again",
"invalid_auth": "Invalid authentication",
"unknown": "Unexpected error",
"login_timeout": "Request timed-out. This is mainly caused by selection of the wrong encryption method."
"login_timeout": "Request timed-out. This is mainly caused by selection of the wrong encryption method"
},
"step": {
"user": {
Expand All @@ -24,11 +24,10 @@
},
"options": {
"step": {
"simple_options": {
"init": {
"title": "Options",
"data": {
"track_wireless_clients": "Show devices connected via WiFi",
"track_wired_clients": "Show devices connected via cable"
"update_interval": "Update interval (in seconds)"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion requirements.test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ pytest-cov<3.0.0
pytest-homeassistant

# from our manifest.json for our Custom Component
sagemcom_api==1.0.1
sagemcom_api==1.0.4

0 comments on commit bfc3676

Please sign in to comment.