diff --git a/platypush/plugins/adafruit/io.py b/platypush/plugins/adafruit/io.py index 06580339..7f13c43a 100644 --- a/platypush/plugins/adafruit/io.py +++ b/platypush/plugins/adafruit/io.py @@ -144,6 +144,29 @@ class AdafruitIoPlugin(Plugin): redis.rpush(self._DATA_THROTTLER_QUEUE, {feed:value}) + @action + def send_location_data(self, feed, lat, lon, value=None): + """ + Send location data to an Adafruit IO feed + + :param feed: Feed name + :type feed: str + + :param lat: Latitude + :type lat: float + + :param lon: Longitude + :type lon: float + + :param value: (Optional) value to send + :type value: Numeric or string + + :param enqueue: If throttle_seconds is set, this method by default will append values to the throttling queue to be periodically flushed instead of sending the message directly. In such case, pass enqueue=False to override the behaviour and send the message directly instead. + :type enqueue: bool + """ + + self.aio.send_location_data(feed=feed, value=value, lat=lat, lon=lon) + @action def receive(self, feed): """