Internally all temperature units are Celsius so just send it directly (#1840)

This commit is contained in:
mtl010957 2021-08-23 21:38:59 -04:00 committed by Jesse Hills
parent 44f8dcfb6e
commit e7404183a0
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -60,6 +60,8 @@ void MQTTClimateComponent::send_discovery(JsonObject &root, mqtt::SendDiscoveryC
root["max_temp"] = traits.get_visual_max_temperature();
// temp_step
root["temp_step"] = traits.get_visual_temperature_step();
// temperature units are always coerced to Celsius internally
root["temp_unit"] = "C";
if (traits.supports_preset(CLIMATE_PRESET_AWAY)) {
// away_mode_command_topic