Shtime-API
There are two ways to access the API
Directly
Use it the following way to access the api, if you have no access to the sh object in your method or function:
# to get access to the object instance: from lib.shtime import Shtime shtime = Shtime.get_instance() # to access a method (eg. to get timezone info): shtime.tzinfo()
Through the main SmartHome object
If you have access to the sh object in your method or function, you can use the following way:
# to access a method (eg. to get timezone info): sh.shtime.tzinfo()
The API is implemented through the following library: