Skip to content

Commit

Permalink
Fixed a couple of typos and added a few comments in the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
slespersen committed Dec 20, 2024
1 parent 1dcbb60 commit da9279a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/evseMQTT/event_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,30 +80,33 @@ async def handle_notification(self, sender, message):

self.device.charge = data

# Update device info if command 262 is received
# Device charge status -- not sure what we need these for
if cmd in [5, 6]:
self.logger.info(f"Device sent a charge status")

# Device responded to charge_start
if cmd == 7:
self.logger.info(f"Device responded to charge_start: {data}")

# Device responded to charge_stop
if cmd == 8:
self.logger.info(f"Device responded to charge_stop: {data}")

# Update device info if command 262 is received
# Device sent a charge record -- not sure what we need these for
if cmd in [9, 10]:
self.logger.info(f"Device sent a charge record")

# Update device info if command 262 is received
if cmd == 262:
self.logger.info(f"Device respondded with {cmd}, containing {data}")
self.logger.info(f"Device responded with {cmd}, containing {data}")
self.device.info = data

# Update device config if command is related
if cmd in [257, 263, 264, 271, 274]:
self.logger.info(f"Device respondded with {cmd}, containing {data}")
self.logger.info(f"Device responded with {cmd}, containing {data}")
self.device.config = data


# Device did not accept the password -- log error
if cmd == 341:
self.logger.error(f"Password was not accepted by device!")

Expand Down

0 comments on commit da9279a

Please sign in to comment.