Fix call to set_climate with new parameters
This commit is contained in:
@@ -108,10 +108,19 @@ script:
|
|||||||
float temp_offset = ${temp_min};
|
float temp_offset = ${temp_min};
|
||||||
float temp_max = ${temp_max};
|
float temp_max = ${temp_max};
|
||||||
float total_steps = (temp_max-temp_offset)/temp_step;
|
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
|
set_climate->execute
|
||||||
(
|
(
|
||||||
thermostat_embedded->current_temperature, // current_temp
|
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, // 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(${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(total_steps)), // total_steps //int(round((10*thermostat_embedded->target_temperature-temp_offset)/temp_step)), // slider_val
|
||||||
int(round(${temp_min}*10)), // temp_offset
|
int(round(${temp_min}*10)), // temp_offset
|
||||||
|
|||||||
Reference in New Issue
Block a user