@@ -256,7 +256,7 @@ def __init__(self, *, url=None, headers=None, json_path=None, regexp_path=None,
256
256
257
257
if self ._debug :
258
258
print ("My IP address is" , self ._esp .pretty_ip (self ._esp .ip_address ))
259
-
259
+
260
260
# set the default background
261
261
self .set_background (self ._default_bg )
262
262
board .DISPLAY .show (self .splash )
@@ -669,18 +669,18 @@ def io_push(self, feed, data):
669
669
aio_key = secrets ['aio_key' ]
670
670
except KeyError :
671
671
raise KeyError ("\n \n " )
672
-
672
+
673
673
wifi = adafruit_esp32spi_wifimanager .ESPSPI_WiFiManager (self ._esp , secrets , None )
674
- io = RESTClient (aio_username , aio_key , wifi )
674
+ io_connect = RESTClient (aio_username , aio_key , wifi )
675
675
676
676
try :
677
- feedID = io .get_feed (feed )
677
+ feed_ID = io_connect .get_feed (feed )
678
678
except AdafruitIO_RequestError :
679
679
# If no feed exists, create one
680
- feedID = io .create_new_feed (feed )
680
+ feed_ID = io_connect .create_new_feed (feed )
681
+
682
+ io_connect .send_data (feed_ID ['key' ], data )
681
683
682
- io .send_data (feedID ['key' ], data )
683
-
684
684
def fetch (self , refresh_url = None ):
685
685
"""Fetch data from the url we initialized with, perfom any parsing,
686
686
and display text or graphics. This function does pretty much everything
0 commit comments