File tree Expand file tree Collapse file tree
custom_components/enpal_webparser Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ([
Original file line number Diff line number Diff line change 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)" ,
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 reached – please 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 werden – bitte Verbindung und Adresse prüfen ."
2434 }
2535 }
2636}
You can’t perform that action at this time.
0 commit comments