Exemplo n.º 1
0
def adjust_thermostat(temp=None, test=False):
    """Adjust the fan depending upon the temperature
           Args:
               temp: current temperature; in None, get from sensor
           Returns:
               None
           Raises:
               None
    """
    if temp == None:
        temp_sensor = SI7021()
        temp = temp_sensor.get_tempC()
    fan = Fan()
    fan.adjust(temp, test)
Exemplo n.º 2
0
def adjust_thermostat(temp=None, test=False):
    """Adjust the fan depending upon the temperature
           Args:
               temp: current temperature; in None, get from sensor
           Returns:
               None
           Raises:
               None
    """
    if temp == None:
        sensor = TempSensor()
        temp = sensor.check_temperature()
    fan = Fan()
    fan.adjust(temp, test)
Exemplo n.º 3
0
def adjustThermostat(temp=None, test=False):
    if temp == None:
        si = si7021()
        temp = si.getTempC()
    fan = Fan()
    fan.adjust(temp, test)