forked from platypush/platypush
Merge branch 'master' into 29-generic-entities-support
This commit is contained in:
commit
72454a6583
1 changed files with 3 additions and 2 deletions
|
@ -158,9 +158,10 @@ class HidPlugin(RunnablePlugin):
|
|||
device = hid.Device(dev_def['vendor_id'], dev_def['product_id']) # type: ignore
|
||||
data = device.read(data_size)
|
||||
except Exception as e:
|
||||
if device:
|
||||
self.logger.warning(f'Read error from {path}: {e}')
|
||||
device = None
|
||||
wait()
|
||||
sleep(5)
|
||||
continue
|
||||
|
||||
if not notify_only_if_changed or data != last_data:
|
||||
|
|
Loading…
Reference in a new issue