@@ -289,7 +289,7 @@ def subscribe_to_errors(self):
289
289
"""
290
290
self ._client .subscribe ("%s/errors" % self ._user )
291
291
292
- def subscribe_to_randomizer (self , randomizer_id ):
292
+ def subscribe_to_randomizer (self , randomizer_id : int ):
293
293
"""Subscribes to a random data stream created by the Adafruit IO Words service.
294
294
295
295
:param int randomizer_id: Random word record you want data for.
@@ -298,7 +298,7 @@ def subscribe_to_randomizer(self, randomizer_id):
298
298
"{0}/integration/words/{1}" .format (self ._user , randomizer_id )
299
299
)
300
300
301
- def subscribe_to_weather (self , weather_record , forecast ):
301
+ def subscribe_to_weather (self , weather_record : int , forecast : str ):
302
302
"""Subscribes to a weather forecast using the Adafruit IO PLUS weather
303
303
service. This feature is only avaliable to Adafruit IO PLUS subscribers.
304
304
@@ -324,7 +324,7 @@ def subscribe_to_time(self, time_type):
324
324
else :
325
325
self ._client .subscribe ("time/" + time_type )
326
326
327
- def unsubscribe (self , feed_key = None , group_key = None , shared_user = None ):
327
+ def unsubscribe (self , feed_key : str = None , group_key : str = None , shared_user : str = None ):
328
328
"""Unsubscribes from an Adafruit IO feed or group.
329
329
Can also subscribe to someone else's feed.
330
330
@@ -364,11 +364,11 @@ def unsubscribe(self, feed_key=None, group_key=None, shared_user=None):
364
364
raise AdafruitIO_MQTTError ("Must provide a feed_key or group_key." )
365
365
366
366
# Publishing
367
- def publish_multiple (self , feeds_and_data , timeout = 3 , is_group = False ):
367
+ def publish_multiple (self , feeds_and_data : List , timeout : int = 3 , is_group : bool = False ):
368
368
"""Publishes multiple data points to multiple feeds or groups with a variable
369
369
timeout.
370
370
371
- :param str feeds_and_data: List of tuples containing topic strings and data values.
371
+ :param list feeds_and_data: List of tuples containing topic strings and data values.
372
372
:param int timeout: Delay between publishing data points to Adafruit IO, in seconds.
373
373
:param bool is_group: Set to True if you're publishing to a group.
374
374
0 commit comments