diff --git a/custom_components/ingresso/__init__.py b/custom_components/ingresso/__init__.py index d3e0946..925b394 100755 --- a/custom_components/ingresso/__init__.py +++ b/custom_components/ingresso/__init__.py @@ -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) diff --git a/custom_components/ingresso/config_flow.py b/custom_components/ingresso/config_flow.py index 314b415..f274766 100755 --- a/custom_components/ingresso/config_flow.py +++ b/custom_components/ingresso/config_flow.py @@ -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", diff --git a/custom_components/ingresso/manifest.json b/custom_components/ingresso/manifest.json index 7e011d6..571186d 100755 --- a/custom_components/ingresso/manifest.json +++ b/custom_components/ingresso/manifest.json @@ -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": [], diff --git a/custom_components/ingresso/sensor.py b/custom_components/ingresso/sensor.py index 972b2a1..db6ae28 100755 --- a/custom_components/ingresso/sensor.py +++ b/custom_components/ingresso/sensor.py @@ -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) diff --git a/custom_components/ingresso/translations/en.json b/custom_components/ingresso/translations/en.json index 0680b31..6b7ca4a 100644 --- a/custom_components/ingresso/translations/en.json +++ b/custom_components/ingresso/translations/en.json @@ -9,6 +9,10 @@ "partnership": "Partnership" } } + }, + "error": { + "city_id_error": "City ID invalid", + "partnership_error": "Partnership invalid" } } } \ No newline at end of file diff --git a/custom_components/ingresso/translations/pt-BR.json b/custom_components/ingresso/translations/pt-BR.json index 87f302d..89699eb 100644 --- a/custom_components/ingresso/translations/pt-BR.json +++ b/custom_components/ingresso/translations/pt-BR.json @@ -9,6 +9,10 @@ "partnership": "Cinema" } } + }, + "error": { + "city_id_error": "ID da cidade inválido", + "partnership_error": "Cinema inválido" } } } \ No newline at end of file