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 11import logging
2+
23from homeassistant .components .select import SelectEntity
34from homeassistant .helpers .aiohttp_client import async_get_clientsession
45
@@ -57,15 +58,14 @@ async def async_update(self):
5758 _LOGGER .warning ("Unknown wallbox mode from sensor: %s" , mode )
5859 return
5960
60- # Wenn gerade ein pending change aktiv ist, dann prüfen:
61+
6162 if self ._pending_change :
6263 if self ._pending_change == new_option :
63- # Auswahl wurde bestätigt → Pending löschen
64+
6465 _LOGGER .debug ("Pending wallbox mode %s confirmed by sensor." , new_option )
6566 self ._current_option = new_option
6667 self ._pending_change = None
6768 else :
68- # Auswahl noch nicht bestätigt → Anzeige bleibt unverändert
6969 _LOGGER .debug ("Wallbox mode change pending: %s (sensor reports %s)" , self ._pending_change , new_option )
7070 else :
7171 self ._current_option = new_option
@@ -78,7 +78,6 @@ async def async_select_option(self, option: str):
7878
7979 await self ._call_wallbox_api (f"/set_{ key } " )
8080
81- # Im Erfolgsfall übernehmen wir nicht direkt — wir warten auf Bestätigung durch Sensor
8281 else :
8382 _LOGGER .warning ("Unknown selected option: %s" , option )
8483
Original file line number Diff line number Diff line change 11import logging
2+
23from homeassistant .components .switch import SwitchEntity
34from homeassistant .helpers .aiohttp_client import async_get_clientsession
45
You can’t perform that action at this time.
0 commit comments