@@ -42,8 +42,9 @@ def __init__(self, esp, secrets, status_pixel=None, attempts=2):
4242 """
4343 :param ESP_SPIcontrol esp: The ESP object we are using
4444 :param dict secrets: The WiFi and Adafruit IO secrets dict (See examples)
45- :param status_pixel: (Optional) The pixel device - A NeoPixel or DotStar (default=None)
46- :type status_pixel: NeoPixel or DotStar
45+ :param status_pixel: (Optional) The pixel device - A NeoPixel, DotStar,
46+ or RGB LED (default=None)
47+ :type status_pixel: NeoPixel, DotStar, or RGB LED
4748 :param int attempts: (Optional) Failed attempts before resetting the ESP32 (default=2)
4849 """
4950 # Read the settings
@@ -54,6 +55,9 @@ def __init__(self, esp, secrets, status_pixel=None, attempts=2):
5455 self .attempts = attempts
5556 requests .set_interface (self ._esp )
5657 self .statuspix = status_pixel
58+ self ._is_rgb_led = False
59+ if hasattr (self .statuspix , 'color' ):
60+ self ._is_rgb_led = True
5761 self .pixel_status (0 )
5862
5963 def reset (self ):
@@ -214,13 +218,15 @@ def ip_address(self):
214218
215219 def pixel_status (self , value ):
216220 """
217- Change Status NeoPixel if it was defined
221+ Change Status NeoPixel/Dotstar/RGBLED if it was defined
218222
219223 :param value: The value to set the Board's status LED to
220224 :type value: int or 3-value tuple
221225 """
222- if self .statuspix :
226+ if self .statuspix and not self . _is_rgb_led :
223227 self .statuspix .fill (value )
228+ else :
229+ self .statuspix .color = value
224230
225231 def signal_strength (self ):
226232 """
0 commit comments