File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 3535LIFX_URL = "https://api.lifx.com/v1/lights/"
3636
3737try :
38- from typing import Union , Dict , Any
39- from adafruit_esp32spi .adafruit_esp32spi_wifimanager import ESPSPI_WiFiManager
40- from adafruit_espatcontrol .adafruit_espatcontrol_wifimanager import (
41- ESPAT_WiFiManager ,
42- )
43- from adafruit_requests import Session , Response
44-
45- WifiManagerType = Union [ESPSPI_WiFiManager , ESPAT_WiFiManager , Session ]
38+ from typing import Dict , Any
39+ from circuitpython_typing .http import HTTPProtocol
40+ from adafruit_requests import Response
4641except ImportError :
4742 pass
4843
@@ -55,7 +50,7 @@ class LIFX:
5550 :param str lifx_token: LIFX API token (https://api.developer.lifx.com/docs/authentication)
5651 """
5752
58- def __init__ (self , wifi_manager : WifiManagerType , lifx_token : str ) -> None :
53+ def __init__ (self , wifi_manager : HTTPProtocol , lifx_token : str ) -> None :
5954 wifi_type = str (type (wifi_manager ))
6055 allowed_wifi_types = ("ESPSPI_WiFiManager" , "ESPAT_WiFiManager" , "Session" )
6156 if any (x in wifi_type for x in allowed_wifi_types ):
Original file line number Diff line number Diff line change 33# SPDX-License-Identifier: Unlicense
44
55Adafruit-Blinka
6+ adafruit-circuitpython-typing ~= 1.8
67adafruit-circuitpython-requests
7- adafruit-circuitpython-esp32spi
8- adafruit-circuitpython-esp-atcontrol
You can’t perform that action at this time.
0 commit comments