Move target_temp set to TFT (#849)
* Move target_temp set to TFT Use TFT to set target temp from slider and +/-. Using decimals for slider. * Update nspanel_esphome.yaml * Update nspanel_eu files * update nspanel_eu_code folder
This commit is contained in:
@@ -320,8 +320,26 @@ api:
|
||||
binary_sensor.is_on: nextion_init
|
||||
- &set_climate_target_temp
|
||||
lambda: |-
|
||||
id(disp1).set_component_value("climate.climateslider", target_temp);
|
||||
id(disp1).set_component_text_printf("climate.target_temp", "%.1f", target_temp);
|
||||
if (target_temp > -999)
|
||||
{
|
||||
id(disp1).set_component_value("climateslider", target_temp);
|
||||
id(disp1).set_component_value("target_temp", target_temp);
|
||||
id(disp1).show_component("target_icon");
|
||||
id(disp1).show_component("target_temp");
|
||||
id(disp1).show_component("t0");
|
||||
id(disp1).show_component("climateslider");
|
||||
id(disp1).show_component("decrease_temp");
|
||||
id(disp1).show_component("increase_temp");
|
||||
}
|
||||
else
|
||||
{
|
||||
id(disp1).hide_component("target_icon");
|
||||
id(disp1).hide_component("target_temp");
|
||||
id(disp1).hide_component("t0");
|
||||
id(disp1).hide_component("climateslider");
|
||||
id(disp1).hide_component("decrease_temp");
|
||||
id(disp1).hide_component("increase_temp");
|
||||
}
|
||||
|
||||
#### Service to set climate state ####
|
||||
- service: set_climate
|
||||
@@ -337,9 +355,11 @@ api:
|
||||
binary_sensor.is_on: nextion_init
|
||||
- *set_climate_target_temp
|
||||
- lambda: |-
|
||||
id(disp1).send_command_printf("climate.climateslider.minval=%i", min_temp);
|
||||
id(disp1).send_command_printf("climate.climateslider.maxval=%i", max_temp);
|
||||
id(disp1).set_component_text_printf("climate.current_temp", "%.1f°", current_temp);
|
||||
id(disp1).send_command_printf("climateslider.minval=%i", min_temp);
|
||||
id(disp1).send_command_printf("climateslider.maxval=%i", max_temp);
|
||||
id(disp1).set_component_text_printf("current_temp", "%.1f°", current_temp);
|
||||
id(disp1).show_component("current_temp");
|
||||
id(disp1).show_component("current_icon");
|
||||
|
||||
#### Service to set the buttons ####
|
||||
- service: set_button
|
||||
|
||||
Reference in New Issue
Block a user