Skip to content

Commit 3fe6a10

Browse files
authored
Merge pull request #8 from derolli1976/bug/translation_error_on_installation
Removed brackets from translation. Upped wallbox timeout
2 parents e17cb16 + b3de88e commit 3fe6a10

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

custom_components/enpal_webparser/config_flow.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from homeassistant.core import callback
88
from homeassistant.helpers import config_validation as cv
99

10-
from .const import DOMAIN, DEFAULT_URL, DEFAULT_INTERVAL, DEFAULT_GROUPS, DEFAULT_USE_WALLBOX_ADDON
10+
from .const import DOMAIN, DEFAULT_URL, DEFAULT_INTERVAL, DEFAULT_GROUPS, DEFAULT_USE_WALLBOX_ADDON, DEFAULT_WALLBOX_API_ENDPOINT
1111

1212
_LOGGER = logging.getLogger(__name__)
1313

@@ -42,10 +42,11 @@ async def validate_enpal_url(url: str) -> bool:
4242

4343

4444
async def validate_wallbox_api() -> bool:
45-
url = "http://localhost:36725/wallbox/status"
45+
url = f"{DEFAULT_WALLBOX_API_ENDPOINT}/status"
46+
4647
try:
4748
async with aiohttp.ClientSession() as session:
48-
async with session.get(url, timeout=5) as response:
49+
async with session.get(url, timeout=25) as response:
4950
if response.status != 200:
5051
_LOGGER.warning("[Enpal] Wallbox API HTTP error: %s", response.status)
5152
return False

custom_components/enpal_webparser/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"domain": "enpal_webparser",
33
"name": "Enpal Solar",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"documentation": "https://github.com/derolli1976/enpal",
66
"issue_tracker": "https://github.com/derolli1976/enpal/issues",
77
"dependencies": [],

custom_components/enpal_webparser/translations/de.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"error": {
1616
"invalid_format": "Ungültige URL - sie muss mit http:// beginnen und eine gültige IP-Adresse oder Host enthalten.",
1717
"unreachable": "Die URL konnte nicht erreicht werden - bitte Verbindung und Adresse prüfen.",
18-
"wallbox_unreachable": "Die Wallbox-API ist nicht erreichbar. Stelle sicher, dass das Add-on läuft und erreichbar ist! Test: http://<Homeassistant-IP-ADDRESSE>:36725/wallbox/status"
18+
"wallbox_unreachable": "Die Wallbox-API ist nicht erreichbar. Stelle sicher, dass das Add-on läuft und erreichbar ist! Test: http://Homeassistant-IP-ADDRESSE:36725/wallbox/status"
1919
}
2020
},
2121
"options": {
@@ -34,7 +34,7 @@
3434
"error": {
3535
"invalid_format": "Ungültige URL - sie muss mit http:// beginnen und eine gültige IP-Adresse oder Host enthalten.",
3636
"unreachable": "Die URL konnte nicht erreicht werden - bitte Verbindung und Adresse prüfen.",
37-
"wallbox_unreachable": "Die Wallbox-API ist nicht erreichbar. Stelle sicher, dass das Add-on läuft und erreichbar ist! Test: http://<Homeassistant-IP-ADDRESSE>:36725/wallbox/status"
37+
"wallbox_unreachable": "Die Wallbox-API ist nicht erreichbar. Stelle sicher, dass das Add-on läuft und erreichbar ist! Test: http://homeassistant-IP-ADDRESSE:36725/wallbox/status"
3838
}
3939
}
4040
}

custom_components/enpal_webparser/translations/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"error": {
1616
"invalid_format": "Invalid URL - it must start with http:// and contain a valid IP address or hostname.",
1717
"unreachable": "The URL could not be reached - please check the connection and address.",
18-
"wallbox_unreachable": "The Wallbox API is not reachable. Make sure the add-on is running and accessible! Test: http://<Home Assistant IP ADDRESS>:36725/wallbox/status"
18+
"wallbox_unreachable": "The Wallbox API is not reachable. Make sure the add-on is running and accessible! Test: http://Home-Assistant-IP-ADDRESS:36725/wallbox/status"
1919
}
2020
},
2121
"options": {
@@ -34,7 +34,7 @@
3434
"error": {
3535
"invalid_format": "Invalid URL - it must start with http:// and contain a valid IP address or hostname.",
3636
"unreachable": "The URL could not be reached - please check the connection and address.",
37-
"wallbox_unreachable": "The Wallbox API is not reachable. Make sure the add-on is running and accessible! Test: http://<Home Assistant IP ADDRESS>:36725/wallbox/status"
37+
"wallbox_unreachable": "The Wallbox API is not reachable. Make sure the add-on is running and accessible! Test: http://Home-Assistant-IP-ADDRESS:36725/wallbox/status"
3838
}
3939
}
4040
}

0 commit comments

Comments
 (0)