upd: fix climate control
This commit is contained in:
@@ -130,9 +130,9 @@ blueprint:
|
|||||||
entity:
|
entity:
|
||||||
domain: climate
|
domain: climate
|
||||||
climate_optimistic:
|
climate_optimistic:
|
||||||
name: Climate control optimistic mode (BUGGY!)
|
name: Climate control optimistic mode
|
||||||
default: false
|
default: true
|
||||||
description: Depends on your climate device and HA-Integration. If optimisitc mode is *off* then changes are made wait for response from device. This can cause delays. If *on* we assume changes are set and update the display immediately.
|
description: Depends on your climate device and HA-Integration. If optimisitc mode is *off* then changes are made will wait for response from device to update temperature in the display. This can cause delays or jumping values. If *on* we update the display immediately but apply changes after closing climate-page.
|
||||||
selector:
|
selector:
|
||||||
boolean:
|
boolean:
|
||||||
|
|
||||||
@@ -744,6 +744,7 @@ trigger_variables:
|
|||||||
current_page: "sensor.{{ nspanel_name_trigger }}_currentpage"
|
current_page: "sensor.{{ nspanel_name_trigger }}_currentpage"
|
||||||
hotwatercharge: !input "hotwatercharge"
|
hotwatercharge: !input "hotwatercharge"
|
||||||
heatingsystemflame: !input "heatingsystemflame"
|
heatingsystemflame: !input "heatingsystemflame"
|
||||||
|
display_target_temperature: "sensor.{{ nspanel_name_trigger }}_display_target_temperature"
|
||||||
|
|
||||||
##### WEATHER Trigger #####
|
##### WEATHER Trigger #####
|
||||||
weather: !input "weather"
|
weather: !input "weather"
|
||||||
@@ -2665,7 +2666,7 @@ action:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ states(climate) == "off" }}'
|
value_template: '{{ states(climate) == "off" }}'
|
||||||
then:
|
then:
|
||||||
- service: climate.turn_on
|
- service: climate.turn_on ############
|
||||||
data:
|
data:
|
||||||
entity_id: !input climate
|
entity_id: !input climate
|
||||||
# - service: climate.set_temperature
|
# - service: climate.set_temperature
|
||||||
@@ -2674,7 +2675,7 @@ action:
|
|||||||
# hvac_mode: 'heat'
|
# hvac_mode: 'heat'
|
||||||
# temperature: "{{ state_attr(climate, 'temperature') }}"
|
# temperature: "{{ state_attr(climate, 'temperature') }}"
|
||||||
else:
|
else:
|
||||||
- service: climate.turn_off
|
- service: climate.turn_off ############
|
||||||
data:
|
data:
|
||||||
entity_id: !input climate
|
entity_id: !input climate
|
||||||
# - service: climate.set_temperature
|
# - service: climate.set_temperature
|
||||||
@@ -2690,15 +2691,18 @@ action:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ states(climate) != "off" }}'
|
value_template: '{{ states(climate) != "off" }}'
|
||||||
then:
|
then:
|
||||||
- variables:
|
|
||||||
current_setpoint: "{{state_attr(climate, 'temperature') | round(1)}}"
|
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ climate_optimistic == true }}'
|
value_template: '{{ climate_optimistic == true }}'
|
||||||
then:
|
then:
|
||||||
|
- variables:
|
||||||
|
current_setpoint: "{{states(display_target_temperature) | round(1)}}"
|
||||||
- service: "{{ command_thermostat_cycle }}"
|
- service: "{{ command_thermostat_cycle }}"
|
||||||
data:
|
data:
|
||||||
value: "{{ current_setpoint -1 }}"
|
value: "{{ current_setpoint -1 }}"
|
||||||
|
else:
|
||||||
|
- variables:
|
||||||
|
current_setpoint: "{{state_attr(climate, 'temperature') | round(1)}}"
|
||||||
- service: climate.set_temperature
|
- service: climate.set_temperature
|
||||||
data:
|
data:
|
||||||
entity_id: !input climate
|
entity_id: !input climate
|
||||||
@@ -2719,15 +2723,21 @@ action:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ climate_optimistic == true }}'
|
value_template: '{{ climate_optimistic == true }}'
|
||||||
then:
|
then:
|
||||||
|
- variables:
|
||||||
|
current_setpoint: "{{states(display_target_temperature) | round(1)}}"
|
||||||
- service: "{{ command_thermostat_cycle }}"
|
- service: "{{ command_thermostat_cycle }}"
|
||||||
data:
|
data:
|
||||||
value: "{{ current_setpoint +1 }}"
|
value: "{{ current_setpoint +1 }}"
|
||||||
|
else:
|
||||||
|
- variables:
|
||||||
|
current_setpoint: "{{state_attr(climate, 'temperature') | round(1)}}"
|
||||||
- service: climate.set_temperature
|
- service: climate.set_temperature
|
||||||
data:
|
data:
|
||||||
entity_id: !input climate
|
entity_id: !input climate
|
||||||
#hvac_mode: 'heat'
|
#hvac_mode: 'heat'
|
||||||
temperature: "{{ current_setpoint +1 }}"
|
temperature: "{{ current_setpoint +1 }}"
|
||||||
|
|
||||||
|
|
||||||
##### Page Climatesettings - climateslider #####
|
##### Page Climatesettings - climateslider #####
|
||||||
- conditions: '{{ trigger.event.data.new_state.state is match "climateslider\d+" and trigger.event.data.new_state.state == states(last_click_climatesettings) }}'
|
- conditions: '{{ trigger.event.data.new_state.state is match "climateslider\d+" and trigger.event.data.new_state.state == states(last_click_climatesettings) }}'
|
||||||
sequence:
|
sequence:
|
||||||
@@ -2775,6 +2785,7 @@ action:
|
|||||||
- service: "{{ command_thermostat_cycle }}"
|
- service: "{{ command_thermostat_cycle }}"
|
||||||
data:
|
data:
|
||||||
value: "{{ new_setpoint }}"
|
value: "{{ new_setpoint }}"
|
||||||
|
else:
|
||||||
- service: climate.set_temperature
|
- service: climate.set_temperature
|
||||||
data:
|
data:
|
||||||
entity_id: !input climate
|
entity_id: !input climate
|
||||||
@@ -3120,6 +3131,27 @@ action:
|
|||||||
data:
|
data:
|
||||||
cmd: home.right_bt_pic.pic={{ right_hardware_button_state }}
|
cmd: home.right_bt_pic.pic={{ right_hardware_button_state }}
|
||||||
|
|
||||||
|
##### apply climate temperature if climate_optimistic #####
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ trigger.event.data.old_state.state == page_climate }}'
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ climate_optimistic == true }}'
|
||||||
|
then:
|
||||||
|
- variables:
|
||||||
|
display_target_temperature: "{{states(display_target_temperature) | round(1)}}"
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: '{{ display_target_temperature != 0.0 }}'
|
||||||
|
then:
|
||||||
|
- service: climate.set_temperature
|
||||||
|
data:
|
||||||
|
entity_id: !input climate
|
||||||
|
#hvac_mode: 'heat'
|
||||||
|
temperature: "{{ display_target_temperature }}"
|
||||||
|
|
||||||
## weather01 ##
|
## weather01 ##
|
||||||
- conditions: '{{ trigger.event.data.new_state.state == page_weather01 }}'
|
- conditions: '{{ trigger.event.data.new_state.state == page_weather01 }}'
|
||||||
sequence:
|
sequence:
|
||||||
@@ -4336,10 +4368,6 @@ action:
|
|||||||
then:
|
then:
|
||||||
- variables:
|
- variables:
|
||||||
target_temp: "{{state_attr(climate, 'temperature') | round(1)}}"
|
target_temp: "{{state_attr(climate, 'temperature') | round(1)}}"
|
||||||
# - service: "{{ command_text_printf }}"
|
|
||||||
# data:
|
|
||||||
# component: target_temp
|
|
||||||
# message: "{{target_temp}}°"
|
|
||||||
- service: "{{ command_thermostat_cycle }}"
|
- service: "{{ command_thermostat_cycle }}"
|
||||||
data:
|
data:
|
||||||
value: "{{target_temp}}"
|
value: "{{target_temp}}"
|
||||||
@@ -4476,8 +4504,8 @@ action:
|
|||||||
id: climate_state
|
id: climate_state
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ states(current_page) == page_climate }}'
|
value_template: '{{ states(current_page) == page_climate }}'
|
||||||
- condition: template
|
# - condition: template
|
||||||
value_template: '{{ climate_optimistic == false }}'
|
# value_template: '{{ climate_optimistic == false }}'
|
||||||
sequence:
|
sequence:
|
||||||
- variables:
|
- variables:
|
||||||
heating_state: >-
|
heating_state: >-
|
||||||
@@ -4503,10 +4531,6 @@ action:
|
|||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ trigger.event.data.new_state.state != "off" }}'
|
value_template: '{{ trigger.event.data.new_state.state != "off" }}'
|
||||||
then:
|
then:
|
||||||
# - service: "{{ command_text_printf }}"
|
|
||||||
# data:
|
|
||||||
# component: target_temp
|
|
||||||
# message: "{{trigger.event.data.new_state.attributes.temperature | round(1)}}°"
|
|
||||||
- service: "{{ command_thermostat_cycle }}"
|
- service: "{{ command_thermostat_cycle }}"
|
||||||
data:
|
data:
|
||||||
value: "{{trigger.event.data.new_state.attributes.temperature | round(1)}}"
|
value: "{{trigger.event.data.new_state.attributes.temperature | round(1)}}"
|
||||||
|
|||||||
@@ -314,6 +314,7 @@ api:
|
|||||||
id(disp1).send_command_printf("climate_right.pic=%i", right);
|
id(disp1).send_command_printf("climate_right.pic=%i", right);
|
||||||
// send target-temp
|
// send target-temp
|
||||||
id(disp1).set_component_text_printf("target_temp", "%.1f°", value);
|
id(disp1).set_component_text_printf("target_temp", "%.1f°", value);
|
||||||
|
id(display_target_temp).publish_state(value);
|
||||||
|
|
||||||
|
|
||||||
##### START - GLOBALS CONFIGURATION #####
|
##### START - GLOBALS CONFIGURATION #####
|
||||||
@@ -465,6 +466,13 @@ sensor:
|
|||||||
- lambda: id(disp1).set_component_text_printf("home.current_temp", "%.1f°", id(temp_nspanel).state); # onboard temp (thermostat temp) to home page.
|
- lambda: id(disp1).set_component_text_printf("home.current_temp", "%.1f°", id(temp_nspanel).state); # onboard temp (thermostat temp) to home page.
|
||||||
# - lambda: id(disp1).set_component_text_printf("climate.current_temp", "%.1f", id(temp_nspanel).state);
|
# - lambda: id(disp1).set_component_text_printf("climate.current_temp", "%.1f", id(temp_nspanel).state);
|
||||||
|
|
||||||
|
##### current value of page-climate target_temp #####
|
||||||
|
- platform: template
|
||||||
|
name: ${device_name} Display Target Temperature
|
||||||
|
id: display_target_temp
|
||||||
|
lambda: return {};
|
||||||
|
update_interval: 10s
|
||||||
|
|
||||||
###### Display Brightness GET VALUE FROM NSPanel SLIDER #####
|
###### Display Brightness GET VALUE FROM NSPanel SLIDER #####
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
id: brightslider
|
id: brightslider
|
||||||
|
|||||||
Reference in New Issue
Block a user