Skip to content

Commit b2fcb66

Browse files
committed
Übersetzungen und doppelte Variablen
1 parent b0fbf65 commit b2fcb66

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

custom_components/enpal_webparser/sensor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ async def async_update_data():
154154
wallbox_url = "http://127.0.0.1:36725/wallbox/status"
155155

156156
async def async_wallbox_update():
157-
wallbox_url = "http://127.0.0.1:36725/wallbox/status"
157+
158158
try:
159159
async with aiohttp.ClientSession() as session:
160-
async with session.get(wallbox_url, timeout=5) as resp:
160+
async with session.get(wallbox_url, timeout=15) as resp:
161161
if resp.status != 200:
162162
raise UpdateFailed(f"Wallbox API Error: {resp.status}")
163163
return await resp.json()
@@ -170,12 +170,12 @@ async def async_wallbox_update():
170170
logger=_LOGGER,
171171
name="Wallbox Status",
172172
update_method=async_wallbox_update,
173-
update_interval=timedelta(seconds=30),
173+
update_interval=timedelta(seconds=interval),
174174
)
175175
try:
176176
await wallbox_coordinator.async_config_entry_first_refresh()
177177
except Exception as e:
178-
raise ConfigEntryNotReady(f"Wallbox-Daten konnten nicht geladen werden: {e}")
178+
raise ConfigEntryNotReady(f"Wallbox-Daten konnten nicht geladen werden: {e}") from e
179179

180180
if entry.options.get("use_wallbox_addon", False):
181181
entities.extend([

custom_components/enpal_webparser/translations/en.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,18 @@
88
"groups": "Select sensor groups",
99
"use_wallbox_addon": "Use Wallbox Add-on (EXPERIMENTAL!)"
1010
}
11-
},
11+
}
12+
},
13+
"error": {
14+
"invalid_format": "Invalid URL – must start with http:// and contain a valid IP or hostname.",
15+
"unreachable": "The URL could not be reached – please check connection and address."
16+
}
17+
},
18+
"options": {
19+
"step": {
1220
"init": {
21+
"title": "Change options",
22+
"description": "You can make changes to your configuration here",
1323
"data": {
1424
"url": "URL / IP address of your Enpal box",
1525
"interval": "Polling interval (in seconds)",
@@ -19,8 +29,8 @@
1929
}
2030
},
2131
"error": {
22-
"invalid_format": "Invalid URL – must start with http:// and contain a valid IP or hostname.",
23-
"unreachable": "The URL could not be reachedplease check connection and address."
32+
"invalid_format": "Ungültige URL – sie muss mit http:// beginnen und eine gültige IP-Adresse oder Host enthalten.",
33+
"unreachable": "Die URL konnte nicht erreicht werdenbitte Verbindung und Adresse prüfen."
2434
}
2535
}
2636
}

0 commit comments

Comments
 (0)