Skip to content

Commit 9debb5f

Browse files
author
lbbrhzn
authored
remove websocket.id (again) (#344)
Co-authored-by: lbbrhzn <@lbbrhzn>
1 parent 602d247 commit 9debb5f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

custom_components/ocpp/api.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,26 +182,20 @@ async def on_connect(
182182
cp_id = cp_id[cp_id.rfind("/") + 1 :]
183183
try:
184184
if self.cpid not in self.charge_points:
185-
_LOGGER.info(
186-
f"Charger {cp_id} connected to {self.host}:{self.port} websocket={websocket.id}."
187-
)
185+
_LOGGER.info(f"Charger {cp_id} connected to {self.host}:{self.port}.")
188186
charge_point = ChargePoint(
189187
cp_id, websocket, self.hass, self.entry, self
190188
)
191189
self.charge_points[self.cpid] = charge_point
192190
await charge_point.start()
193191
else:
194-
_LOGGER.info(
195-
f"Charger {cp_id} reconnected to {self.host}:{self.port} websocket={websocket.id}."
196-
)
192+
_LOGGER.info(f"Charger {cp_id} reconnected to {self.host}:{self.port}.")
197193
charge_point: ChargePoint = self.charge_points[self.cpid]
198194
await charge_point.reconnect(websocket)
199195
except Exception as e:
200196
_LOGGER.error(f"Exception occurred:\n{e}", exc_info=True)
201197
finally:
202-
_LOGGER.info(
203-
f"Charger {cp_id} disconnected from {self.host}:{self.port} websocket={websocket.id}."
204-
)
198+
_LOGGER.info(f"Charger {cp_id} disconnected from {self.host}:{self.port}.")
205199

206200
def get_metric(self, cp_id: str, measurand: str):
207201
"""Return last known value for given measurand."""

0 commit comments

Comments
 (0)