Temperature¶
-
class
knut.apis.Temperature¶ Interact with the temperature service.
This class extends the
KnutAPIto handle the following requests:The temperature back-ends accessed by this class are registered in the
backendsdictionary. They can be add usingadd_backend()which also connects the back-end’son_change()event to thenotifier()method.-
add_backend(backend: knut.services.temperature.temperature.Temperature) → None¶ Adds the backend to the
backendsdictionary.
-
backends= None¶ A dictionary with all back-ends where the keys are the unique names and the values are the corresponding temperature objects
knut.services.temperature.Temperature.
-
notifier(uid: str) → None¶ Pushes a
TEMPERATURE_STATUS_RESPONSEfor uid via theon_push()event.
-
status(uid: str) → dict¶ Returns a status dictionary of the back-end specified by its uid.
The returned dictionary has the keys:
'location'as string where the temperature is measured'unit'as string with the valueK'condition'is a string with the code point for the Weather Icon font'temperature'as a float
-