- class platypush.plugins.sensor.lis3dh.SensorLis3dhPlugin(*_, **__)#
Plugin to interact with an Adafruit LIS3DH accelerometer and get X,Y,Z measurement. Tested with a Raspberry Pi over I2C connection.
pip install Adafruit-GPIO)
- __init__(g=4, precision=None, poll_interval=1, **kwargs)#
Only LIS3DH in I2C mode is currently supported: https://learn.adafruit.com/assets/59080.
- get_measurement(*_, **__)#
The sensor’s current position as a dictionary with the three components (x,y,z) in degrees, each between -90 and 90
- transform_entities(entities: Dict[str, Any]) List[Accelerometer] #
This method takes a list of entities in any (plugin-specific) format and converts them into a standardized collection of Entity objects. Since this method is called by
publish_entities()before entity updates are published, you may usually want to extend it to pre-process the entities managed by your extension into the standard format before they are stored and published to all the consumers.