Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions adafruit_portalbase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,15 +410,17 @@ def get_local_time(self, location=None):
"""Accessor function for get_local_time()"""
return self.network.get_local_time(location=location)

def push_to_io(self, feed_key, data):
def push_to_io(self, feed_key, data, metadata=None, precision=None):
"""Push data to an adafruit.io feed

:param str feed_key: Name of feed key to push data to.
:param data: data to send to feed
:param dict metadata: Optional metadata associated with the data
:param int precision: Optional amount of precision points to send with floating point data

"""

self.network.push_to_io(feed_key, data)
self.network.push_to_io(feed_key, data, metadata=metadata, precision=precision)

def get_io_data(self, feed_key):
"""Return all values from the Adafruit IO Feed Data that matches the feed key
Expand Down