platypush/platypush/message/event/distance.py
Fabio Manganiello 470f4a8fc9 Added disable_web_clients_notification on Event for events
generated with high throughput that shouldn't be propagated
to the connected websockets.
2019-12-22 19:38:01 +01:00

13 lines
422 B
Python

from platypush.message.event import Event
class DistanceSensorEvent(Event):
"""
Event triggered when a new value is processed by a distance sensor.
"""
def __init__(self, distance: float, unit: str = 'mm', *args, **kwargs):
super().__init__(*args, distance=distance, unit=unit, disable_logging=True,
disable_web_clients_notification=True, **kwargs)
# vim:sw=4:ts=4:et: