Last Updated on : 2024-06-05 03:14:36download
This topic describes the utility methods related to temperature.
f2c
Convert the temperature from Fahrenheit to Celsius.
Name | Data type | Description | Required |
---|---|---|---|
fah | number | The temperature in degree Fahrenheit (°F). | Yes |
Name | Data type | Description |
---|---|---|
tem | number | Convert from Fahrenheit to Celsius |
import { Utils } from "tuya-panel-kit";
const { f2c } = Utils.TemperatureUtils;
f2c(fah);
// Example:
f2c(100);
38
c2f
Convert the temperature from Celsius to Fahrenheit.
Name | Data type | Description | Required |
---|---|---|---|
cel | number | The temperature in degree Celsius (°C). | Yes |
Name | Data type | Description |
---|---|---|
fri | number | Convert from Celsius to Fahrenheit |
import { Utils } from "tuya-panel-kit";
const { c2f } = Utils.TemperatureUtils;
c2f(cel);
// Example:
c2f(100);
212
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback