Fix call to set_climate with new parameters
This commit is contained in:
@@ -108,15 +108,24 @@ script:
|
||||
float temp_offset = ${temp_min};
|
||||
float temp_max = ${temp_max};
|
||||
float total_steps = (temp_max-temp_offset)/temp_step;
|
||||
uint supported_hvac_modes = 0;
|
||||
if (${addon_climate_dual})
|
||||
supported_hvac_modes = 3;
|
||||
else
|
||||
supported_hvac_modes = supported_hvac_modes + ((${addon_climate_heat}) ? 1 : 0) + ((${addon_climate_cool}) ? 2 : 0);
|
||||
set_climate->execute
|
||||
(
|
||||
thermostat_embedded->current_temperature, // current_temp
|
||||
thermostat_embedded->target_temperature, // target_temp
|
||||
int(round(${temp_step}*10)), // temp_step
|
||||
int(round(total_steps)), // total_steps //int(round((10*thermostat_embedded->target_temperature-temp_offset)/temp_step)), // slider_val
|
||||
int(round(${temp_min}*10)), // temp_offset
|
||||
"", // climate_icon
|
||||
true // embedded_climate
|
||||
thermostat_embedded->current_temperature, // current_temp
|
||||
0, // supported_features
|
||||
supported_hvac_modes, // supported_hvac_modes
|
||||
thermostat_embedded->target_temperature, // target_temp
|
||||
thermostat_embedded->target_temperature_high, //target_temp_high
|
||||
thermostat_embedded->target_temperature_low, //target_temp_low
|
||||
int(round(${temp_step}*10)), // temp_step
|
||||
int(round(total_steps)), // total_steps //int(round((10*thermostat_embedded->target_temperature-temp_offset)/temp_step)), // slider_val
|
||||
int(round(${temp_min}*10)), // temp_offset
|
||||
"", // climate_icon
|
||||
true // embedded_climate
|
||||
);
|
||||
|
||||
// Update target temp icon
|
||||
|
||||
Reference in New Issue
Block a user