mirror of
https://github.com/esphome/esphome.git
synced 2025-03-15 15:18:16 +00:00
Satisfying clang
This commit is contained in:
parent
94d0f2de84
commit
acfa00d769
@ -887,7 +887,7 @@ void PrometheusHandler::climate_row_(AsyncResponseStream *stream, climate::Clima
|
||||
stream->print(F("\"} 0\n"));
|
||||
// Data itself
|
||||
std::string climate_mode_category = "mode";
|
||||
auto climate_mode_value = climate::climate_mode_to_string(obj->mode);
|
||||
const auto *climate_mode_value = climate::climate_mode_to_string(obj->mode);
|
||||
climate_setting_row_(stream, obj, area, node, friendly_name, climate_mode_category, climate_mode_value);
|
||||
const auto traits = obj->get_traits();
|
||||
// Now see if traits is supported
|
||||
@ -931,22 +931,22 @@ void PrometheusHandler::climate_row_(AsyncResponseStream *stream, climate::Clima
|
||||
}
|
||||
if (traits.get_supports_action()) {
|
||||
std::string climate_trait_category = "action";
|
||||
auto climate_trait_value = climate::climate_action_to_string(obj->action);
|
||||
const auto *climate_trait_value = climate::climate_action_to_string(obj->action);
|
||||
climate_setting_row_(stream, obj, area, node, friendly_name, climate_trait_category, climate_trait_value);
|
||||
}
|
||||
if (traits.get_supports_fan_modes() && obj->fan_mode.has_value()) {
|
||||
std::string climate_trait_category = "fan_mode";
|
||||
auto climate_trait_value = climate::climate_fan_mode_to_string(obj->fan_mode.value());
|
||||
const auto *climate_trait_value = climate::climate_fan_mode_to_string(obj->fan_mode.value());
|
||||
climate_setting_row_(stream, obj, area, node, friendly_name, climate_trait_category, climate_trait_value);
|
||||
}
|
||||
if (traits.get_supports_presets() && obj->preset.has_value()) {
|
||||
std::string climate_trait_category = "preset";
|
||||
auto climate_trait_value = climate::climate_preset_to_string(obj->preset.value());
|
||||
const auto *climate_trait_value = climate::climate_preset_to_string(obj->preset.value());
|
||||
climate_setting_row_(stream, obj, area, node, friendly_name, climate_trait_category, climate_trait_value);
|
||||
}
|
||||
if (traits.get_supports_swing_modes()) {
|
||||
std::string climate_trait_category = "swing_mode";
|
||||
auto climate_trait_value = climate::climate_swing_mode_to_string(obj->swing_mode);
|
||||
const auto *climate_trait_value = climate::climate_swing_mode_to_string(obj->swing_mode);
|
||||
climate_setting_row_(stream, obj, area, node, friendly_name, climate_trait_category, climate_trait_value);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user