From 9debb5f391e49befc3e8a8cbeb7653e1a887771d Mon Sep 17 00:00:00 2001 From: lbbrhzn Date: Wed, 2 Feb 2022 01:42:36 +0100 Subject: [PATCH] remove websocket.id (again) (#344) Co-authored-by: lbbrhzn <@lbbrhzn> --- custom_components/ocpp/api.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/custom_components/ocpp/api.py b/custom_components/ocpp/api.py index 9a9b3c59..9989de88 100644 --- a/custom_components/ocpp/api.py +++ b/custom_components/ocpp/api.py @@ -182,26 +182,20 @@ async def on_connect( cp_id = cp_id[cp_id.rfind("/") + 1 :] try: if self.cpid not in self.charge_points: - _LOGGER.info( - f"Charger {cp_id} connected to {self.host}:{self.port} websocket={websocket.id}." - ) + _LOGGER.info(f"Charger {cp_id} connected to {self.host}:{self.port}.") charge_point = ChargePoint( cp_id, websocket, self.hass, self.entry, self ) self.charge_points[self.cpid] = charge_point await charge_point.start() else: - _LOGGER.info( - f"Charger {cp_id} reconnected to {self.host}:{self.port} websocket={websocket.id}." - ) + _LOGGER.info(f"Charger {cp_id} reconnected to {self.host}:{self.port}.") charge_point: ChargePoint = self.charge_points[self.cpid] await charge_point.reconnect(websocket) except Exception as e: _LOGGER.error(f"Exception occurred:\n{e}", exc_info=True) finally: - _LOGGER.info( - f"Charger {cp_id} disconnected from {self.host}:{self.port} websocket={websocket.id}." - ) + _LOGGER.info(f"Charger {cp_id} disconnected from {self.host}:{self.port}.") def get_metric(self, cp_id: str, measurand: str): """Return last known value for given measurand."""