Merge pull request #10 from weirdtangent/fix/unsupported-device-crash

fix: prevent crash when unsupported device model is configured
pull/106/head
Jeff Culverhouse 6 days ago committed by GitHub
commit c583432d06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -30,7 +30,7 @@ class RefreshMixin:
async def collect_all_device_events(self: Amcrest2Mqtt) -> None:
tasks = []
for device_id in self.amcrest_devices:
for device_id in self.devices:
if self.is_rebooting(device_id):
self.logger.debug(f"skipping collecting events for '{self.get_device_name(device_id)}', still rebooting")
continue
@ -42,7 +42,7 @@ class RefreshMixin:
async def collect_all_device_snapshots(self: Amcrest2Mqtt) -> None:
tasks = []
for device_id in self.amcrest_devices:
for device_id in self.devices:
if self.is_rebooting(device_id):
self.logger.debug(f"skipping snapshot for '{self.get_device_name(device_id)}', still rebooting")
continue

Loading…
Cancel
Save