Climate: support to target_temp_step (#853)
* Climate: support to `target_temp_step` Adding support to attribute `target_temp_step` to define the step of changing temperature. `0.5` will be used if this attribute is not available on the climate entity. * Update nspanel_esphome.yaml * Update nspanel_eu files * Update nspanel_eu_code files
This commit is contained in:
@@ -314,7 +314,8 @@ api:
|
||||
#### Service to set climate target_temp ####
|
||||
- service: set_climate_target_temp
|
||||
variables:
|
||||
target_temp: float
|
||||
target_temp: int
|
||||
slider_val: int
|
||||
then:
|
||||
- wait_until:
|
||||
binary_sensor.is_on: nextion_init
|
||||
@@ -322,7 +323,7 @@ api:
|
||||
lambda: |-
|
||||
if (target_temp > -999)
|
||||
{
|
||||
id(disp1).set_component_value("climateslider", target_temp);
|
||||
id(disp1).set_component_value("climateslider", slider_val);
|
||||
id(disp1).set_component_value("target_temp", target_temp);
|
||||
id(disp1).show_component("target_icon");
|
||||
id(disp1).show_component("target_temp");
|
||||
@@ -344,19 +345,20 @@ api:
|
||||
#### Service to set climate state ####
|
||||
- service: set_climate
|
||||
variables:
|
||||
state: string
|
||||
hvac_modes: string
|
||||
current_temp: float
|
||||
target_temp: float
|
||||
min_temp: int
|
||||
max_temp: int
|
||||
target_temp: int
|
||||
temp_step: int
|
||||
total_steps: int
|
||||
slider_val: int
|
||||
temp_offset: int
|
||||
then:
|
||||
- wait_until:
|
||||
binary_sensor.is_on: nextion_init
|
||||
- *set_climate_target_temp
|
||||
- lambda: |-
|
||||
id(disp1).send_command_printf("climateslider.minval=%i", min_temp);
|
||||
id(disp1).send_command_printf("climateslider.maxval=%i", max_temp);
|
||||
id(disp1).send_command_printf("climateslider.maxval=%i", total_steps);
|
||||
id(disp1).set_component_value("temp_offset", temp_offset);
|
||||
id(disp1).set_component_value("temp_step", temp_step);
|
||||
id(disp1).set_component_text_printf("current_temp", "%.1f°", current_temp);
|
||||
id(disp1).show_component("current_temp");
|
||||
id(disp1).show_component("current_icon");
|
||||
@@ -913,7 +915,7 @@ display:
|
||||
- logger.log: "Nextion start - Jump to page 8"
|
||||
- lambda: id(disp1).send_command_printf("page 8");
|
||||
- logger.log: "Nextion start - Publish ESPHome version"
|
||||
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.3.1"); ### esphome-version ###
|
||||
- lambda: id(disp1).set_component_text_printf("boot.esph_version", "%s", "3.3.2"); ### esphome-version ###
|
||||
- logger.log: "Nextion start - Wait for Home Assistant API"
|
||||
- wait_until:
|
||||
api.connected
|
||||
|
||||
Reference in New Issue
Block a user