platypush.message.event.distance

class platypush.message.event.distance.DistanceSensorEvent(distance: float, unit: str = 'mm', *args, **kwargs)[source]

Event triggered when a new value is processed by a distance sensor.

__init__(distance: float, unit: str = 'mm', *args, **kwargs)[source]

Params: target – Target node [String] origin – Origin node (default: current node) [String] id – Event ID (default: auto-generated) kwargs – Additional arguments for the event [kwDict]