Skip to content

Commit e8fce42

Browse files
authored
Merge pull request #50 from makermelissa/fix_push_to_io
Add push_to_io optional params to wrapper
2 parents 30ba445 + 1fc777d commit e8fce42

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adafruit_portalbase/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,15 +410,17 @@ def get_local_time(self, location=None):
410410
"""Accessor function for get_local_time()"""
411411
return self.network.get_local_time(location=location)
412412

413-
def push_to_io(self, feed_key, data):
413+
def push_to_io(self, feed_key, data, metadata=None, precision=None):
414414
"""Push data to an adafruit.io feed
415415
416416
:param str feed_key: Name of feed key to push data to.
417417
:param data: data to send to feed
418+
:param dict metadata: Optional metadata associated with the data
419+
:param int precision: Optional amount of precision points to send with floating point data
418420
419421
"""
420422

421-
self.network.push_to_io(feed_key, data)
423+
self.network.push_to_io(feed_key, data, metadata=metadata, precision=precision)
422424

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

0 commit comments

Comments
 (0)