lib.tools

This library contains the Tools-class from the original smarthome.py

Note:These functions should be concidered deprecated. New helper-functions are going to be implemented in the utils.lib.
class lib.tools.Tools[source]

Bases: object

abs2rel(t, ah)[source]

Return the relative humidity from the absolute humidity (g/cm3) and temperature (Celsius)

Parameters:
  • t (float) – temperature in celsius
  • ah – absolute humidity (g/cm3)
Returns:

val = relative humidity (in percent)

Return type:

dict

dewpoint(t, rf)[source]
dt2js(dt)[source]
dt2ts(dt)[source]
fetch_url(url, username=None, password=None, timeout=2, warn_no_connect=1, method='GET', body=None, errorItem=None)[source]
ping(host)[source]
rel2abs(t, rf)[source]
runtime()[source]