4
4
# License, v. 2.0. If a copy of the MPL was not distributed with this
5
5
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
6
6
7
- from .ucloud import AIOTClient # noqa
8
- from .ucloud import AIOTObject
7
+ from .ucloud import ArduinoCloud # noqa
8
+ from .ucloud import ArduinoCloudObject
9
9
from .ucloud import timestamp
10
10
11
11
try :
36
36
)
37
37
38
38
39
- class Location (AIOTObject ):
39
+ class Location (ArduinoCloudObject ):
40
40
def __init__ (self , name , ** kwargs ):
41
41
super ().__init__ (name , keys = {"lat" , "lon" }, ** kwargs )
42
42
43
43
44
- class Color (AIOTObject ):
44
+ class Color (ArduinoCloudObject ):
45
45
def __init__ (self , name , ** kwargs ):
46
46
super ().__init__ (name , keys = {"hue" , "sat" , "bri" }, ** kwargs )
47
47
48
48
49
- class ColoredLight (AIOTObject ):
49
+ class ColoredLight (ArduinoCloudObject ):
50
50
def __init__ (self , name , ** kwargs ):
51
51
super ().__init__ (name , keys = {"swi" , "hue" , "sat" , "bri" }, ** kwargs )
52
52
53
53
54
- class DimmedLight (AIOTObject ):
54
+ class DimmedLight (ArduinoCloudObject ):
55
55
def __init__ (self , name , ** kwargs ):
56
56
super ().__init__ (name , keys = {"swi" , "bri" }, ** kwargs )
57
57
58
58
59
- class Schedule (AIOTObject ):
59
+ class Schedule (ArduinoCloudObject ):
60
60
def __init__ (self , name , ** kwargs ):
61
61
kwargs .update ({("runnable" , True )}) # Force task creation.
62
62
self .on_active = kwargs .pop ("on_active" , None )
@@ -78,7 +78,7 @@ async def run(self, aiot):
78
78
await asyncio .sleep (self .interval )
79
79
80
80
81
- class Task (AIOTObject ):
81
+ class Task (ArduinoCloudObject ):
82
82
def __init__ (self , name , ** kwargs ):
83
83
kwargs .update ({("runnable" , True )}) # Force task creation.
84
84
self .on_run = kwargs .pop ("on_run" , None )
0 commit comments