Skip to content

Commit

Permalink
Changed debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
CJNE committed Sep 2, 2021
1 parent a57e931 commit 17a0679
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pymyenergi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,19 @@ async def refresh(self):
serial = device_data.get("sno")
existing_device = self.devices.get(serial, None)
if existing_device is None:
_LOGGER.debug(f"Adding device with serial {serial}")
device_obj = device_factory(
self._connection, key, serial, device_data
)
serial_key = device_obj.prefix + str(device_obj.serial_number)
device_obj.name = self.find_device_name(
serial_key, f"{device_obj.kind}-{device_obj.serial_number}"
)
_LOGGER.debug(f"Adding {device_obj.kind} {device_obj.name}")
self.devices[serial] = device_obj
else:
_LOGGER.debug(f"Updating {existing_device.kind} serial {serial}")
_LOGGER.debug(
f"Updating {existing_device.kind} {existing_device.name}"
)
existing_device.data = device_data

async def fetch_data(self):
Expand Down

0 comments on commit 17a0679

Please sign in to comment.