Light¶
-
class
knut.apis.Light¶ Interact with light services.
This class extends the
KnutAPIto handle the following requests:-
backends= None¶ A dictionary with all back-ends where the keys are the identifiers of the back-ends and the values are the corresponding light objects
Light.
-
notifier(uid)¶ Pushes the
status()of the back-end with the uid to all listeners of theon_push()event.
-
request_handler(msg_id, msg)¶ Return the tuple (response_id, response) upon a request.
Handle the request msg of type msg_id and return a corresponding response of type response_id. If either no valid request msg was passed, or the request does not expect any response, the response
(0x0000, {})is returned.This method checks the
supporteddictionary and calls the corresponding callback function if found.