fix: formatting

pull/106/head
Jeff Culverhouse 2 months ago
parent b0100f0931
commit cd4e1aa628

@ -30,7 +30,9 @@ class AmcrestMixin:
device_display_name = f"'{self.get_device_name(device_id)}'"
except KeyError:
device_display_name = f"({device_id})"
self.logger.error(f"error during build_component for device '{device_name}' {device_display_name}: " f"{exception_type}: {result}", exc_info=True)
self.logger.error(
f"error during build_component for device '{device_name}' {device_display_name}: " f"{exception_type}: {result}", exc_info=True
)
elif result and isinstance(result, str):
seen_devices.add(result)

@ -65,11 +65,11 @@ class EventsMixin:
# record just these "events": text and time
self.upsert_state(device_id, sensor={"event_text": event})
needs_publish.add(device_id)
self.logger.debug(f'processed event for \'{self.get_device_name(device_id)}\': {event} with {payload}')
self.logger.debug(f"processed event for '{self.get_device_name(device_id)}': {event} with {payload}")
else:
# we ignore these on purpose, but log if something unexpected comes through
if event not in ["NtpAdjustTime", "TimeChange", "RtspSessionDisconnect"]:
self.logger.debug(f'ignored unexpected event for \'{self.get_device_name(device_id)}\': {event} with {payload}')
self.logger.debug(f"ignored unexpected event for '{self.get_device_name(device_id)}': {event} with {payload}")
tasks = [self.publish_device_state(device_id) for device_id in needs_publish]
if tasks:

Loading…
Cancel
Save