mirror of
https://github.com/geoffdavis/esphome-mitsubishiheatpump
synced 2024-08-30 18:12:13 +00:00
Fixes logging crash in fan mode and swing.
The logging for both fan mode and swing was trying to log unsigned integers as strings causing the esp device to crash. This change now logs the string representation of both the fan and swing modes at the verbose level.
This commit is contained in:
parent
b1938e1bd2
commit
872c2bf551
@ -219,7 +219,8 @@ void MitsubishiHeatPump::control(const climate::ClimateCall &call) {
|
||||
|
||||
//const char* FAN_MAP[6] = {"AUTO", "QUIET", "1", "2", "3", "4"};
|
||||
if (call.get_fan_mode().has_value()) {
|
||||
ESP_LOGV("control", "Requested fan mode is %d", *call.get_fan_mode());
|
||||
ESP_LOGV("control", "Requested fan mode is %s",
|
||||
climate::climate_fan_mode_to_string(*call.get_fan_mode()));
|
||||
this->fan_mode = *call.get_fan_mode();
|
||||
switch(*call.get_fan_mode()) {
|
||||
case climate::CLIMATE_FAN_OFF:
|
||||
@ -255,10 +256,12 @@ void MitsubishiHeatPump::control(const climate::ClimateCall &call) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ESP_LOGV(TAG, "in the swing mode stage");
|
||||
//const char* VANE_MAP[7] = {"AUTO", "1", "2", "3", "4", "5", "SWING"};
|
||||
if (call.get_swing_mode().has_value()) {
|
||||
ESP_LOGD(TAG, "control - requested swing mode is %d",
|
||||
*call.get_swing_mode());
|
||||
ESP_LOGV(TAG, "control - requested swing mode is %s",
|
||||
climate::climate_swing_mode_to_string(*call.get_swing_mode()));
|
||||
|
||||
this->swing_mode = *call.get_swing_mode();
|
||||
switch(*call.get_swing_mode()) {
|
||||
|
Loading…
Reference in New Issue
Block a user