Set heater temps.
556136
def sync_heater_control(self, device_id, fan_status=None,
                            power_status=None):
        """"""
        loop = asyncio.get_event_loop()
        task = loop.create_task(self.heater_control(device_id,
                                                    fan_status,
                                                    power_status))
        loop.run_until_complete(task)
1145715
async def heater_control(self, device_id, fan_status=None,
                             power_status=None):
        """"""
        heater = self.heaters.get(device_id)
        if heater is None:
            _LOGGER.error("No such device")
            return
        if fan_status is None:
            fan_status = heater.fan_status
        if power_status is None:
            power_status = heater.power_status
        operation = 0 if fan_status == heater.fan_status else 4
        payload = {"subDomain": heater.sub_domain,
                   "deviceId": device_id,
                   "testStatus": 1,
                   "operation": operation,
                   "status": power_status,
                   "windStatus": fan_status,
                   "holdTemp": heater.set_temp,
                   "tempType": 0,
                   "powerLevel": 0}
        await self.request("deviceControl", payload)
34635
private function _temperature()
    {
        foreach ($this->_buf as $sensor) {
            if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Temperature'))
                ||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Temperature')))
               && isset($sensor['Unit']) && ($sensor['Unit'] == 'degrees C')
               && isset($sensor['Value'])) {
                $dev = new SensorDevice();
                $dev->setName($sensor['Sensor']);
                $dev->setValue($sensor['Value']);
                if (isset($sensor['Upper Critical']) && (($max = $sensor['Upper Critical']) != "na")) {
                    $dev->setMax($max);
                }
                if (isset($sensor['Status']) && (($status = $sensor['Status']) != "ok")) {
                    $dev->setEvent($status);
                }
                $this->mbinfo->setMbTemp($dev);
            }
        }
    }
1046918
def target_temperature(self, temperature):
        """"""
        dev_temp = int(temperature * 2)
        if temperature == EQ3BT_OFF_TEMP or temperature == EQ3BT_ON_TEMP:
            dev_temp |= 0x40
            value = struct.pack('BB', PROP_MODE_WRITE, dev_temp)
        else:
            self._verify_temperature(temperature)
            value = struct.pack('BB', PROP_TEMPERATURE_WRITE, dev_temp)

        self._conn.make_request(PROP_WRITE_HANDLE, value)
235528
def set_categories(self):
        """"""
        self.categories = []
        temp_categories = self.soup.findAll('category')
        for category in temp_categories:
            category_text = category.string
            self.categories.append(category_text)
366184
def update_data(self):
        """"""
        time_elapsed = datetime.datetime.now() - self.start_time
        crntTemp = self.roaster.current_temp
        targetTemp = self.roaster.target_temp
        heaterLevel = self.roaster.heater_level
        # print(
        #     "Time: %4.6f, crntTemp: %d, targetTemp: %d, heaterLevel: %d" %
        #     (time_elapsed.total_seconds(), crntTemp, targetTemp, heaterLevel))
        self.file.write(
            "%4.6f,%d,%d,%d\n" %
            (time_elapsed.total_seconds(), crntTemp, targetTemp, heaterLevel))
824747
def set_color_temp(self, color_temp, *, index=0, transition_time=None):
        """"""
        self._value_validate(color_temp, RANGE_MIREDS, "Color temperature")

        values = {
            ATTR_LIGHT_MIREDS: color_temp
        }

        if transition_time is not None:
            values[ATTR_TRANSITION_TIME] = transition_time

        return self.set_values(values, index=index)
876663
def set_data(self, data):
        """"""
        for key, val in data.items():
            setattr(self, key, val)
        self.uptime['reloaded'] = datetime.now()
1008437
def set_temperature(self, target_temperature):
        
        try:
            target_temperature = float(target_temperature)
        except Exception as err:
            LOG.debug("Thermostat.set_temperature: Exception %s" % (err,))
            return False
        self.writeNodeData("SET_TEMPERATURE", target_temperature)
556944
void setTempDir() {
        synchronized (AbstractDatabaseConfiguration.class) {
            final String tempDir = getTempDir();
            if (!tempDir.equals(AbstractDatabaseConfiguration.tempDir)) {
                AbstractDatabaseConfiguration.tempDir = tempDir;
                C4Base.setTempDir(AbstractDatabaseConfiguration.tempDir);
            }
        }
    }
854216
def update(self):
        """"""
        self._controller.update(self._id, wake_if_asleep=False)

        data = self._controller.get_climate_params(self._id)
        if data:
            if time.time() - self.__manual_update_time > 60:
                self.__is_auto_conditioning_on = (data
                                                  ['is_auto_conditioning_on'])
                self.__is_climate_on = data['is_climate_on']
                self.__driver_temp_setting = (data['driver_temp_setting']
                                              if data['driver_temp_setting']
                                              else self.__driver_temp_setting)
                self.__passenger_temp_setting = (data['passenger_temp_setting']
                                                 if
                                                 data['passenger_temp_setting']
                                                 else
                                                 self.__passenger_temp_setting)
            self.__inside_temp = (data['inside_temp'] if data['inside_temp']
                                  else self.__inside_temp)
            self.__outside_temp = (data['outside_temp'] if data['outside_temp']
                                   else self.__outside_temp)
            self.__fan_status = data['fan_status']
1028841
def temperature(self) -> Optional[ErrorValue]:
        """"""
        try:
            return ErrorValue(self._data['Temperature'], self._data.setdefault('TemperatureError', 0.0))
        except KeyError:
            return None
7102
def set_temperature(self, set_point):
        
        response = self.api_interface.set_device_state(self, {
            "desired_state": {'set_point': set_point}
        })

        self._update_state_from_response(response)
275410
def heating_remaining(self):
        """"""
        try:
            if self.side == 'left':
                timerem = self.device.device_data['leftHeatingDuration']
            elif self.side == 'right':
                timerem = self.device.device_data['rightHeatingDuration']
            return timerem
        except TypeError:
            return None
587942
def temperature(self, temperature):
        
        try:
            cmd = self.command_set.temperature(temperature)
            self.send(cmd)
            self._temperature = temperature
        except AttributeError:
            self._setter('_temperature', temperature,
                         self._warmest, self._coolest,
                         self._to_temperature)
321346
def call_heat(tstat):
    
    current_hsp, current_csp = tstat.heating_setpoint, tstat.cooling_setpoint
    current_temp = tstat.temperature
    tstat.write({
        'heating_setpoint': current_temp+10,
        'cooling_setpoint': current_temp+20,
        'mode': HEAT,
    })

    def restore():
        tstat.write({
            'heating_setpoint': current_hsp,
            'cooling_setpoint': current_csp,
            'mode': AUTO,
        })
    return restore
1291806
def _compute_heating_rates(self):
        
        for varname in list(self.state.keys()):
            self.heating_rate[varname] = self.state[varname] * 0.