Skip to content

Commit

Permalink
fix: fix error messsages
Browse files Browse the repository at this point in the history
  • Loading branch information
hudsonbrendon committed Apr 26, 2023
1 parent 672c778 commit d58b073
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion custom_components/ingresso/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def get():
url = BASE_URL.format(city_id, partnership)
retry_strategy = Retry(
total=3,
status_forcelist=[400, 401, 404, 500, 502, 503, 504],
status_forcelist=[400, 401, 500, 502, 503, 504],
method_whitelist=["GET"],
)
adapter = HTTPAdapter(max_retries=retry_strategy)
Expand Down
4 changes: 2 additions & 2 deletions custom_components/ingresso/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ async def async_step_user(self, user_input=None):
},
)

errors[CONF_CITY_ID] = "auth_error"
errors[CONF_PARTNERSHIP] = "auth_error"
errors[CONF_CITY_ID] = "city_id_error"
errors[CONF_PARTNERSHIP] = "partnership_error"

return self.async_show_form(
step_id="user",
Expand Down
2 changes: 1 addition & 1 deletion custom_components/ingresso/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "ingresso",
"name": "Ingresso",
"version": "2.6.5",
"version": "2.6.6",
"documentation": "https://github.com/hudsonbrendon/sensor.ingresso.com#readme",
"issue_tracker": "https://github.com/hudsonbrendon/sensor.ingresso.com/issues",
"dependencies": [],
Expand Down
2 changes: 1 addition & 1 deletion custom_components/ingresso/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def update(self) -> None:

retry_strategy = Retry(
total=3,
status_forcelist=[400, 401, 404, 500, 502, 503, 504],
status_forcelist=[400, 401, 500, 502, 503, 504],
method_whitelist=["GET"],
)
adapter = HTTPAdapter(max_retries=retry_strategy)
Expand Down
4 changes: 4 additions & 0 deletions custom_components/ingresso/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"partnership": "Partnership"
}
}
},
"error": {
"city_id_error": "City ID invalid",
"partnership_error": "Partnership invalid"
}
}
}
4 changes: 4 additions & 0 deletions custom_components/ingresso/translations/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"partnership": "Cinema"
}
}
},
"error": {
"city_id_error": "ID da cidade inválido",
"partnership_error": "Cinema inválido"
}
}
}

0 comments on commit d58b073

Please sign in to comment.