Support to Fahrenheit with esp-idf
This commit is contained in:
@@ -1257,7 +1257,8 @@ sensor:
|
|||||||
reference_resistance: 10kOhm
|
reference_resistance: 10kOhm
|
||||||
filters:
|
filters:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
if ("${temp_units}" == "°F" or "${temp_units}" == "F" or "${temp_units}" == "°f" or "${temp_units}" == "f")
|
std::string temp_unit = "${temp_units}";
|
||||||
|
if (temp_unit == "°F" or temp_unit == "F" or temp_unit == "°f" or temp_unit == "f")
|
||||||
return (x * (9.0/5.0)) + 32.0 + temperature_correction->state;
|
return (x * (9.0/5.0)) + 32.0 + temperature_correction->state;
|
||||||
else
|
else
|
||||||
return x + temperature_correction->state;
|
return x + temperature_correction->state;
|
||||||
|
|||||||
Reference in New Issue
Block a user