@@ -80,14 +80,17 @@ This can be done using the {attr}`~kasa.Device.internal_state` property.
80
80
## Modules and Features
81
81
82
82
The functionality provided by all {class}` ~kasa.Device ` instances is (mostly) done inside separate modules.
83
- While the individual device-type specific classes provide an easy access for the most import features ,
84
- you can also access individual modules through {attr}` kasa.Device.modules ` .
85
- You can get the list of supported modules for a given device instance using {attr }` ~kasa.Device.supported_modules ` .
83
+ While the device class provides easy access for most device related attributes ,
84
+ for components like ` light ` and ` camera ` you can access the module through {attr}` kasa.Device.modules ` .
85
+ The module names are handily available as constants on {class }` ~kasa.Module ` and will return type aware values from the collection .
86
86
87
- ``` {note}
88
- If you only need some module-specific information,
89
- you can call the wanted method on the module to avoid using {meth}`~kasa.Device.update`.
90
- ```
87
+ Features represent individual pieces of functionality within a module like brightness, hsv and temperature within a light module.
88
+ They allow for instrospection and can be accessed through {attr}` kasa.Device.features ` .
89
+ Attributes can be accessed via a ` Feature ` or a module attribute depending on the use case.
90
+ Modules tend to provide richer functionality but using the features does not require an understanding of the module api.
91
+
92
+ :::{include} featureattributes.md
93
+ :::
91
94
92
95
(topics-protocols-and-transports)=
93
96
## Protocols and Transports
@@ -137,96 +140,3 @@ The base exception for all library errors is {class}`KasaException <kasa.excepti
137
140
- If the library encounters and unsupported deviceit raises an {class}` UnsupportedDeviceError <kasa.exceptions.UnsupportedDeviceError> ` .
138
141
- If the device fails to respond within a timeout the library raises a {class}` TimeoutError <kasa.exceptions.TimeoutError> ` .
139
142
- All other failures will raise the base {class}` KasaException <kasa.exceptions.KasaException> ` class.
140
-
141
- <!-- Commenting out this section keeps git seeing the change as a rename.
142
-
143
- API documentation for modules and features
144
- ******************************************
145
-
146
- .. autoclass:: kasa.Module
147
- :noindex:
148
- :members:
149
- :inherited-members:
150
- :undoc-members:
151
-
152
- .. automodule:: kasa.interfaces
153
- :noindex:
154
- :members:
155
- :inherited-members:
156
- :undoc-members:
157
-
158
- .. autoclass:: kasa.Feature
159
- :noindex:
160
- :members:
161
- :inherited-members:
162
- :undoc-members:
163
-
164
-
165
-
166
- API documentation for protocols and transports
167
- **********************************************
168
-
169
- .. autoclass:: kasa.protocols.BaseProtocol
170
- :members:
171
- :inherited-members:
172
- :undoc-members:
173
-
174
- .. autoclass:: kasa.protocols.IotProtocol
175
- :members:
176
- :inherited-members:
177
- :undoc-members:
178
-
179
- .. autoclass:: kasa.protocols.SmartProtocol
180
- :members:
181
- :inherited-members:
182
- :undoc-members:
183
-
184
- .. autoclass:: kasa.transports.BaseTransport
185
- :members:
186
- :inherited-members:
187
- :undoc-members:
188
-
189
- .. autoclass:: kasa.transports.XorTransport
190
- :members:
191
- :inherited-members:
192
- :undoc-members:
193
-
194
- .. autoclass:: kasa.transports.KlapTransport
195
- :members:
196
- :inherited-members:
197
- :undoc-members:
198
-
199
- .. autoclass:: kasa.transports.KlapTransportV2
200
- :members:
201
- :inherited-members:
202
- :undoc-members:
203
-
204
- .. autoclass:: kasa.transports.AesTransport
205
- :members:
206
- :inherited-members:
207
- :undoc-members:
208
-
209
- API documentation for errors and exceptions
210
- *******************************************
211
-
212
- .. autoclass:: kasa.exceptions.KasaException
213
- :members:
214
- :undoc-members:
215
-
216
- .. autoclass:: kasa.exceptions.DeviceError
217
- :members:
218
- :undoc-members:
219
-
220
- .. autoclass:: kasa.exceptions.AuthenticationError
221
- :members:
222
- :undoc-members:
223
-
224
- .. autoclass:: kasa.exceptions.UnsupportedDeviceError
225
- :members:
226
- :undoc-members:
227
-
228
- .. autoclass:: kasa.exceptions.TimeoutError
229
- :members:
230
- :undoc-members:
231
-
232
- -->
0 commit comments