change blueprint, esphome

This commit is contained in:
Blackymas
2022-11-08 09:47:06 +01:00
parent 28d8b54749
commit 1bf8a0b941
2 changed files with 359 additions and 361 deletions

View File

@@ -771,11 +771,19 @@ variables:
right_button_name: !input "right_button_name" right_button_name: !input "right_button_name"
##### NEXTION PIC MAPPING ##### ##### NEXTION PIC MAPPING #####
cover_pic_closed: "106" button_light_off: "62"
cover_pic_open: "107" button_light_on: "63"
battery_icon: "108" button_switch_off: "64"
light_pic_off: "125" button_switch_on: "65"
light_pic_on: "126" button_cover_off: "66"
button_cover_on: "67"
cover_pic_closed: "78"
cover_pic_open: "79"
battery_icon: "80"
light_pic_off: "96"
light_pic_on: "97"
hotwater_pic_off: "60"
hotwater_pic_on: "61"
weather_sunny: "2" weather_sunny: "2"
weather_cloudy: "3" weather_cloudy: "3"
@@ -796,20 +804,14 @@ variables:
weather_execptional_night: "14" weather_execptional_night: "14"
weather_clear_night: "15" weather_clear_night: "15"
weather_icon_blank: "53" weather_icon_blank: "51"
weather_icon_rain: "59" weather_icon_rain: "52"
weather_icon_sun: "60" weather_icon_sun: "53"
weather_icon_protect: "61" weather_icon_protect: "54"
weather_icon_lightning: "62" weather_icon_lightning: "55"
weather_icon_wind: "63" weather_icon_wind: "56"
###### NEXTION COLOR BUTTON DESIGN ##### ###### NEXTION COLOR MAPPING #####
button_light_off: "90"
button_light_on: "91"
button_switch_off: "92"
button_switch_on: "93"
button_cover_off: "94"
button_cover_on: "95"
button_color_1: "65535" button_color_1: "65535"
button_color_2: "10597" button_color_2: "10597"
@@ -1735,7 +1737,7 @@ action:
milliseconds: "{{ delay_value }}" milliseconds: "{{ delay_value }}"
- service: "{{ command_printf }}" - service: "{{ command_printf }}"
data: data:
cmd: home.p01.pic=68 cmd: home.p01.pic={{ hotwater_pic_on }}
- delay: - delay:
milliseconds: "{{ delay_value }}" milliseconds: "{{ delay_value }}"
- service: "{{ command_text_printf }}" - service: "{{ command_text_printf }}"
@@ -1884,7 +1886,7 @@ action:
milliseconds: "{{ delay_value }}" milliseconds: "{{ delay_value }}"
- service: "{{ command_text_printf }}" - service: "{{ command_text_printf }}"
data: data:
component: home.left_button component: home.left_bt_text
message: "{{ left_button_name }}" message: "{{ left_button_name }}"
##### NSPanel boot init - Left Button ##### ##### NSPanel boot init - Left Button #####
@@ -1892,7 +1894,7 @@ action:
milliseconds: "{{ delay_value }}" milliseconds: "{{ delay_value }}"
- service: "{{ command_text_printf }}" - service: "{{ command_text_printf }}"
data: data:
component: home.right_button component: home.right_bt_text
message: "{{ right_button_name }}" message: "{{ right_button_name }}"
##### NSPanel boot init finished ##### ##### NSPanel boot init finished #####
@@ -2765,7 +2767,7 @@ action:
milliseconds: "{{ delay_value }}" milliseconds: "{{ delay_value }}"
- service: "{{ command_printf }}" - service: "{{ command_printf }}"
data: data:
cmd: home.p01.pic=68 cmd: home.p01.pic={{ hotwater_pic_on }}

View File

@@ -328,8 +328,6 @@ binary_sensor:
pin: pin:
number: 14 number: 14
inverted: true inverted: true
# on_click:
# - switch.toggle: relay_1
##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY ##### ##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY #####
- platform: gpio - platform: gpio
@@ -337,44 +335,42 @@ binary_sensor:
pin: pin:
number: 27 number: 27
inverted: true inverted: true
# on_click:
# - switch.toggle: relay_2
##### THERMOSTAT - BUTTON DECREASES CLIMATE TARGET TEMPERATURE IN HA ##### ##### THERMOSTAT - BUTTON DECREASES CLIMATE TARGET TEMPERATURE IN HA #####
- platform: nextion # - platform: nextion
name: ${device_name} Climate Target DOWN # name: ${device_name} Climate Target DOWN
page_id: 6 # page_id: 6
component_id: 13 # component_id: 13
internal: true # internal: true
on_click: # on_click:
- homeassistant.service: # - homeassistant.service:
service: climate.set_temperature # service: climate.set_temperature
data_template: # data_template:
entity_id: ${ha_climate_thermostat} # entity_id: ${ha_climate_thermostat}
temperature: !lambda return id(climate_target_temp_val_global) - 0.5; # temperature: !lambda return id(climate_target_temp_val_global) - 0.5;
##### THERMOSTAT - BUTTON INCREASES CLIMATE TARGET TEMPERATURE IN HA ##### ##### THERMOSTAT - BUTTON INCREASES CLIMATE TARGET TEMPERATURE IN HA #####
- platform: nextion # - platform: nextion
name: ${device_name} Climate Target UP # name: ${device_name} Climate Target UP
page_id: 6 # page_id: 6
component_id: 14 # component_id: 14
internal: true # internal: true
on_click: # on_click:
- homeassistant.service: # - homeassistant.service:
service: climate.set_temperature # service: climate.set_temperature
data_template: # data_template:
entity_id: ${ha_climate_thermostat} # entity_id: ${ha_climate_thermostat}
temperature: !lambda return id(climate_target_temp_val_global) + 0.5; # temperature: !lambda return id(climate_target_temp_val_global) + 0.5;
##### THERMOSTAT - BUTTON ON / OFF Heating ##### ##### THERMOSTAT - BUTTON ON / OFF Heating #####
- platform: nextion # - platform: nextion
name: ${device_name} Heating Room State # name: ${device_name} Heating Room State
id: heating_room_state # id: heating_room_state
page_id: 6 # page_id: 6
component_id: 16 # component_id: 16
internal: true # internal: true
on_click: # on_click:
- switch.toggle: hvac_mode # - switch.toggle: hvac_mode
##### Restart NSPanel Button ##### ##### Restart NSPanel Button #####
- platform: nextion - platform: nextion
@@ -468,222 +464,222 @@ sensor:
- lambda: id(disp1).set_component_text_printf("thermostat.a04", "%.1f", id(temp_nspanel).state); - lambda: id(disp1).set_component_text_printf("thermostat.a04", "%.1f", id(temp_nspanel).state);
##### THERMOSTAT CLIMATE TARGET TEMPERATURE FROM HA ##### ##### THERMOSTAT CLIMATE TARGET TEMPERATURE FROM HA #####
- platform: homeassistant # - platform: homeassistant
id: ha_climate_target_temp # id: ha_climate_target_temp
entity_id: ${ha_climate_thermostat_target_temp} # entity_id: ${ha_climate_thermostat_target_temp}
on_value: # on_value:
then: # then:
- wait_until: # - wait_until:
switch.is_on: nextion_init # switch.is_on: nextion_init
- globals.set: # - globals.set:
id: climate_target_temp_val_global # id: climate_target_temp_val_global
value: !lambda 'return float(x);' # value: !lambda 'return float(x);'
- lambda: id(disp1).set_component_text_printf("thermostat.a05", "%.1f", id(climate_target_temp_val_global)); # - lambda: id(disp1).set_component_text_printf("thermostat.a05", "%.1f", id(climate_target_temp_val_global));
# THERMO PROGRESS CIRCLE, broken into 3 images to create space for the temperatures in the center. # # THERMO PROGRESS CIRCLE, broken into 3 images to create space for the temperatures in the center.
- lambda: |- # - lambda: |-
int left=16; // 16 is empty left. # int left=16; // 16 is empty left.
int mid=17; // 17 is empty mid. # int mid=17; // 17 is empty mid.
int right=18; // 18 is empty right. # int right=18; // 18 is empty right.
if (id(climate_target_temp_val_global) == 13) { # if (id(climate_target_temp_val_global) == 13) {
left=16; # left=16;
mid=17; # mid=17;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 13.5) { # } else if (id(climate_target_temp_val_global) == 13.5) {
left=19; # left=19;
mid=17; # mid=17;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 14) { # } else if (id(climate_target_temp_val_global) == 14) {
left=20; # left=20;
mid=17; # mid=17;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 14.5) { # } else if (id(climate_target_temp_val_global) == 14.5) {
left=21; # left=21;
mid=17; # mid=17;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 15) { # } else if (id(climate_target_temp_val_global) == 15) {
left=22; # left=22;
mid=17; # mid=17;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 15.5) { # } else if (id(climate_target_temp_val_global) == 15.5) {
left=23; # left=23;
mid=17; # mid=17;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 16) { # } else if (id(climate_target_temp_val_global) == 16) {
left=24; # left=24;
mid=17; # mid=17;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 16.5) { # } else if (id(climate_target_temp_val_global) == 16.5) {
left=25; # left=25;
mid=17; # mid=17;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 17) { # } else if (id(climate_target_temp_val_global) == 17) {
left=26; # left=26;
mid=17; # mid=17;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 17.5) { # } else if (id(climate_target_temp_val_global) == 17.5) {
left=27; # left=27;
mid=17; # mid=17;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 18) { # } else if (id(climate_target_temp_val_global) == 18) {
left=28; # left=28;
mid=17; # mid=17;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 18.5) { # } else if (id(climate_target_temp_val_global) == 18.5) {
left=29; # left=29;
mid=30; # mid=30;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 19) { # } else if (id(climate_target_temp_val_global) == 19) {
left=29; # left=29;
mid=31; # mid=31;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 19.5) { # } else if (id(climate_target_temp_val_global) == 19.5) {
left=29; # left=29;
mid=32; # mid=32;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 20) { # } else if (id(climate_target_temp_val_global) == 20) {
left=29; # left=29;
mid=33; # mid=33;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 20.5) { # } else if (id(climate_target_temp_val_global) == 20.5) {
left=29; # left=29;
mid=34; # mid=34;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 21) { # } else if (id(climate_target_temp_val_global) == 21) {
left=29; # left=29;
mid=35; # mid=35;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 21.5) { # } else if (id(climate_target_temp_val_global) == 21.5) {
left=29; # left=29;
mid=36; # mid=36;
right=18; # right=18;
} else if (id(climate_target_temp_val_global) == 22) { # } else if (id(climate_target_temp_val_global) == 22) {
left=29; # left=29;
mid=37; # mid=37;
right=38; # right=38;
} else if (id(climate_target_temp_val_global) == 22.5) { # } else if (id(climate_target_temp_val_global) == 22.5) {
left=29; # left=29;
mid=37; # mid=37;
right=39; # right=39;
} else if (id(climate_target_temp_val_global) == 23) { # } else if (id(climate_target_temp_val_global) == 23) {
left=29; # left=29;
mid=37; # mid=37;
right=40; # right=40;
} else if (id(climate_target_temp_val_global) == 23.5) { # } else if (id(climate_target_temp_val_global) == 23.5) {
left=29; # left=29;
mid=37; # mid=37;
right=41; # right=41;
} else if (id(climate_target_temp_val_global) == 24) { # } else if (id(climate_target_temp_val_global) == 24) {
left=29; # left=29;
mid=37; # mid=37;
right=42; # right=42;
} else if (id(climate_target_temp_val_global) == 24.5) { # } else if (id(climate_target_temp_val_global) == 24.5) {
left=29; # left=29;
mid=37; # mid=37;
right=43; # right=43;
} else if (id(climate_target_temp_val_global) == 25) { # } else if (id(climate_target_temp_val_global) == 25) {
left=29; # left=29;
mid=37; # mid=37;
right=44; # right=44;
} else if (id(climate_target_temp_val_global) == 25.5) { # } else if (id(climate_target_temp_val_global) == 25.5) {
left=29; # left=29;
mid=37; # mid=37;
right=45; # right=45;
} else if (id(climate_target_temp_val_global) == 26) { # } else if (id(climate_target_temp_val_global) == 26) {
left=29; # left=29;
mid=37; # mid=37;
right=46; # right=46;
} else if (id(climate_target_temp_val_global) == 26.5) { # } else if (id(climate_target_temp_val_global) == 26.5) {
left=29; # left=29;
mid=37; # mid=37;
right=47; # right=47;
} else if (id(climate_target_temp_val_global) == 27) { # } else if (id(climate_target_temp_val_global) == 27) {
left=29; # left=29;
mid=37; # mid=37;
right=48; # right=48;
} # }
// sends the 3 images to the display # // sends the 3 images to the display
id(disp1).send_command_printf("thermostat.a01.pic=%i", left); # id(disp1).send_command_printf("thermostat.a01.pic=%i", left);
id(disp1).send_command_printf("thermostat.a02.pic=%i", mid); # id(disp1).send_command_printf("thermostat.a02.pic=%i", mid);
id(disp1).send_command_printf("thermostat.a03.pic=%i", right); # id(disp1).send_command_printf("thermostat.a03.pic=%i", right);
###### TARGET TEMPERATURE GET VALUE FROM NEXTION CIRCLE SLIDER AND SET GLOBAL VARIBLE ##### ###### TARGET TEMPERATURE GET VALUE FROM NEXTION CIRCLE SLIDER AND SET GLOBAL VARIBLE #####
- platform: nextion # - platform: nextion
id: climate_circleslider # id: climate_circleslider
name: ${device_name} Climate circleslider # name: ${device_name} Climate circleslider
variable_name: climateslider # variable_name: climateslider
internal: true # internal: true
on_value: # on_value:
then: # then:
- wait_until: # - wait_until:
switch.is_on: nextion_init # switch.is_on: nextion_init
- globals.set: # - globals.set:
id: climate_slider_val_global # id: climate_slider_val_global
value: !lambda 'return int(x);' # value: !lambda 'return int(x);'
- lambda: |- # - lambda: |-
if (id(climate_slider_val_global) == 0) { # if (id(climate_slider_val_global) == 0) {
id(climate_target_temp_val_global) = 13; # id(climate_target_temp_val_global) = 13;
} else if (id(climate_slider_val_global) == 1) { # } else if (id(climate_slider_val_global) == 1) {
id(climate_target_temp_val_global) = 13.5; # id(climate_target_temp_val_global) = 13.5;
} else if (id(climate_slider_val_global) == 2) { # } else if (id(climate_slider_val_global) == 2) {
id(climate_target_temp_val_global) = 14; # id(climate_target_temp_val_global) = 14;
} else if (id(climate_slider_val_global) == 3) { # } else if (id(climate_slider_val_global) == 3) {
id(climate_target_temp_val_global) = 14.5; # id(climate_target_temp_val_global) = 14.5;
} else if (id(climate_slider_val_global) == 4) { # } else if (id(climate_slider_val_global) == 4) {
id(climate_target_temp_val_global) = 15; # id(climate_target_temp_val_global) = 15;
} else if (id(climate_slider_val_global) == 5) { # } else if (id(climate_slider_val_global) == 5) {
id(climate_target_temp_val_global) = 15.5; # id(climate_target_temp_val_global) = 15.5;
} else if (id(climate_slider_val_global) == 6) { # } else if (id(climate_slider_val_global) == 6) {
id(climate_target_temp_val_global) = 16; # id(climate_target_temp_val_global) = 16;
} else if (id(climate_slider_val_global) == 7) { # } else if (id(climate_slider_val_global) == 7) {
id(climate_target_temp_val_global) = 16.5; # id(climate_target_temp_val_global) = 16.5;
} else if (id(climate_slider_val_global) == 8) { # } else if (id(climate_slider_val_global) == 8) {
id(climate_target_temp_val_global) = 17; # id(climate_target_temp_val_global) = 17;
} else if (id(climate_slider_val_global) == 9) { # } else if (id(climate_slider_val_global) == 9) {
id(climate_target_temp_val_global) = 17.5; # id(climate_target_temp_val_global) = 17.5;
} else if (id(climate_slider_val_global) == 10) { # } else if (id(climate_slider_val_global) == 10) {
id(climate_target_temp_val_global) = 18; # id(climate_target_temp_val_global) = 18;
} else if (id(climate_slider_val_global) == 11) { # } else if (id(climate_slider_val_global) == 11) {
id(climate_target_temp_val_global) = 18.5; # id(climate_target_temp_val_global) = 18.5;
} else if (id(climate_slider_val_global) == 12) { # } else if (id(climate_slider_val_global) == 12) {
id(climate_target_temp_val_global) = 19; # id(climate_target_temp_val_global) = 19;
} else if (id(climate_slider_val_global) == 13) { # } else if (id(climate_slider_val_global) == 13) {
id(climate_target_temp_val_global) = 19.5; # id(climate_target_temp_val_global) = 19.5;
} else if (id(climate_slider_val_global) == 14) { # } else if (id(climate_slider_val_global) == 14) {
id(climate_target_temp_val_global) = 20; # id(climate_target_temp_val_global) = 20;
} else if (id(climate_slider_val_global) == 15) { # } else if (id(climate_slider_val_global) == 15) {
id(climate_target_temp_val_global) = 20.5; # id(climate_target_temp_val_global) = 20.5;
} else if (id(climate_slider_val_global) == 16) { # } else if (id(climate_slider_val_global) == 16) {
id(climate_target_temp_val_global) = 21; # id(climate_target_temp_val_global) = 21;
} else if (id(climate_slider_val_global) == 17) { # } else if (id(climate_slider_val_global) == 17) {
id(climate_target_temp_val_global) = 21.5; # id(climate_target_temp_val_global) = 21.5;
} else if (id(climate_slider_val_global) == 18) { # } else if (id(climate_slider_val_global) == 18) {
id(climate_target_temp_val_global) = 22; # id(climate_target_temp_val_global) = 22;
} else if (id(climate_slider_val_global) == 19) { # } else if (id(climate_slider_val_global) == 19) {
id(climate_target_temp_val_global) = 22.5; # id(climate_target_temp_val_global) = 22.5;
} else if (id(climate_slider_val_global) == 20) { # } else if (id(climate_slider_val_global) == 20) {
id(climate_target_temp_val_global) = 23; # id(climate_target_temp_val_global) = 23;
} else if (id(climate_slider_val_global) == 21) { # } else if (id(climate_slider_val_global) == 21) {
id(climate_target_temp_val_global) = 23.5; # id(climate_target_temp_val_global) = 23.5;
} else if (id(climate_slider_val_global) == 22) { # } else if (id(climate_slider_val_global) == 22) {
id(climate_target_temp_val_global) = 24; # id(climate_target_temp_val_global) = 24;
} else if (id(climate_slider_val_global) == 23) { # } else if (id(climate_slider_val_global) == 23) {
id(climate_target_temp_val_global) = 24.5; # id(climate_target_temp_val_global) = 24.5;
} else if (id(climate_slider_val_global) == 24) { # } else if (id(climate_slider_val_global) == 24) {
id(climate_target_temp_val_global) = 25; # id(climate_target_temp_val_global) = 25;
} else if (id(climate_slider_val_global) == 25) { # } else if (id(climate_slider_val_global) == 25) {
id(climate_target_temp_val_global) = 25.5; # id(climate_target_temp_val_global) = 25.5;
} else if (id(climate_slider_val_global) == 26) { # } else if (id(climate_slider_val_global) == 26) {
id(climate_target_temp_val_global) = 26; # id(climate_target_temp_val_global) = 26;
} else if (id(climate_slider_val_global) == 27) { # } else if (id(climate_slider_val_global) == 27) {
id(climate_target_temp_val_global) = 26.5; # id(climate_target_temp_val_global) = 26.5;
} else if (id(climate_slider_val_global) == 28) { # } else if (id(climate_slider_val_global) == 28) {
id(climate_target_temp_val_global) = 27; # id(climate_target_temp_val_global) = 27;
} # }
- homeassistant.service: # - homeassistant.service:
service: climate.set_temperature # service: climate.set_temperature
data_template: # data_template:
entity_id: ${ha_climate_thermostat} # entity_id: ${ha_climate_thermostat}
temperature: !lambda return id(climate_target_temp_val_global); # temperature: !lambda return id(climate_target_temp_val_global);
###### Display Brightness GET VALUE FROM NSPanel SLIDER ##### ###### Display Brightness GET VALUE FROM NSPanel SLIDER #####
- platform: nextion - platform: nextion
@@ -768,9 +764,9 @@ text_sensor:
disabled_by_default: true disabled_by_default: true
##### SUN SENSOR FROM HA ##### ##### SUN SENSOR FROM HA #####
- platform: homeassistant # - platform: homeassistant
id: sun_sun # id: sun_sun
entity_id: sun.sun # entity_id: sun.sun
##### last click sensor, the main action variable - push to HA ##### ##### last click sensor, the main action variable - push to HA #####
- platform: nextion - platform: nextion
@@ -857,37 +853,37 @@ text_sensor:
value: !lambda return x; value: !lambda return x;
##### HEATING System ICON ##### ##### HEATING System ICON #####
- platform: homeassistant # - platform: homeassistant
entity_id: ${ha_heating_system_flame} # entity_id: ${ha_heating_system_flame}
name: "Heating System" # name: "Heating System"
id: heating_system # id: heating_system
on_value: # on_value:
then: # then:
- wait_until: # - wait_until:
switch.is_on: nextion_init # switch.is_on: nextion_init
- lambda: |- # - lambda: |-
int symbol=53; // 53 is a blank image 20x20 # int symbol=53; // 53 is a blank image 20x20
if (id(heating_system).state == "on") { # if (id(heating_system).state == "on") {
symbol=64; # symbol=64;
} # }
id(disp1).send_command_printf("home.a50.pic=%i", symbol); # id(disp1).send_command_printf("home.a50.pic=%i", symbol);
id(disp1).send_command_printf("thermostat.a50.pic=%i", symbol); # id(disp1).send_command_printf("thermostat.a50.pic=%i", symbol);
##### Hotwater Charge ICON ##### ##### Hotwater Charge ICON #####
- platform: homeassistant # - platform: homeassistant
entity_id: ${ha_hotwater_charge} # entity_id: ${ha_hotwater_charge}
name: "Hotwater Charge" # name: "Hotwater Charge"
id: hotwater_charge # id: hotwater_charge
on_value: # on_value:
then: # then:
- wait_until: # - wait_until:
switch.is_on: nextion_init # switch.is_on: nextion_init
- lambda: |- # - lambda: |-
if (id(hotwater_charge).state == "on") { # if (id(hotwater_charge).state == "on") {
id(disp1).set_component_value("thermostat.a12",1); # id(disp1).set_component_value("thermostat.a12",1);
} else { # } else {
id(disp1).set_component_value("thermostat.a12",0); # id(disp1).set_component_value("thermostat.a12",0);
} # }
######################################### #########################################
# #
@@ -952,45 +948,45 @@ switch:
number: 19 number: 19
##### Switch Climate HVAC Mode ##### ##### Switch Climate HVAC Mode #####
- platform: template # - platform: template
device_class: switch # device_class: switch
name: ${device_name} hvac Mode # name: ${device_name} hvac Mode
id: hvac_mode # id: hvac_mode
restore_state: true # restore_state: true
assumed_state: false # assumed_state: false
optimistic: true # optimistic: true
on_turn_off: # on_turn_off:
- lambda: id(disp1).set_component_value("thermostat.a10",0); # - lambda: id(disp1).set_component_value("thermostat.a10",0);
- globals.set: # - globals.set:
id: hvac_mode_global # id: hvac_mode_global
value: '0' # value: '0'
- homeassistant.service: # - homeassistant.service:
service: climate.set_hvac_mode # service: climate.set_hvac_mode
data_template: # data_template:
entity_id: $ha_climate_thermostat # entity_id: $ha_climate_thermostat
hvac_mode: 'off' # hvac_mode: 'off'
- lambda: id(disp1).send_command_printf("thermostat.a06.pic=49"); # - lambda: id(disp1).send_command_printf("thermostat.a06.pic=49");
- lambda: id(disp1).send_command_printf("home.a51.pic=53"); # - lambda: id(disp1).send_command_printf("home.a51.pic=53");
- lambda: id(disp1).send_command_printf("thermostat.a51.pic=53"); # - lambda: id(disp1).send_command_printf("thermostat.a51.pic=53");
on_turn_on: # on_turn_on:
- lambda: id(disp1).set_component_value("thermostat.a10",1); # - lambda: id(disp1).set_component_value("thermostat.a10",1);
- globals.set: # - globals.set:
id: hvac_mode_global # id: hvac_mode_global
value: '1' # value: '1'
- homeassistant.service: # - homeassistant.service:
service: climate.set_hvac_mode # service: climate.set_hvac_mode
data_template: # data_template:
entity_id: $ha_climate_thermostat # entity_id: $ha_climate_thermostat
hvac_mode: 'heat' # hvac_mode: 'heat'
- lambda: |- # - lambda: |-
if (id(heating_room_global) == 0) # if (id(heating_room_global) == 0)
{ # {
id(disp1).send_command_printf("thermostat.a06.pic=50"); # id(disp1).send_command_printf("thermostat.a06.pic=50");
} else if (id(heating_room_global) == 1) { # } else if (id(heating_room_global) == 1) {
id(disp1).send_command_printf("thermostat.a06.pic=51"); # id(disp1).send_command_printf("thermostat.a06.pic=51");
} # }
- lambda: id(disp1).send_command_printf("home.a51.pic=65"); # - lambda: id(disp1).send_command_printf("home.a51.pic=65");
- lambda: id(disp1).send_command_printf("thermostat.a51.pic=65"); # - lambda: id(disp1).send_command_printf("thermostat.a51.pic=65");
##### DISPLAY ALWAYS ON ##### ##### DISPLAY ALWAYS ON #####
- platform: gpio - platform: gpio
@@ -1138,26 +1134,26 @@ display:
{ {
id(disp1).set_component_value("settings.a02",1); id(disp1).set_component_value("settings.a02",1);
} }
- lambda: |- # - lambda: |-
id(disp1).send_command_printf("home.a50.pic=53"); # id(disp1).send_command_printf("home.a50.pic=53");
id(disp1).send_command_printf("thermostat.a50.pic=53"); # id(disp1).send_command_printf("thermostat.a50.pic=53");
id(disp1).send_command_printf("thermostat.a06.pic=50"); # id(disp1).send_command_printf("thermostat.a06.pic=50");
if (id(heating_room_global) == 1) # if (id(heating_room_global) == 1)
{ # {
id(disp1).send_command_printf("home.a52.pic=66"); # id(disp1).send_command_printf("home.a52.pic=66");
id(disp1).send_command_printf("thermostat.a52.pic=66"); # id(disp1).send_command_printf("thermostat.a52.pic=66");
id(disp1).send_command_printf("thermostat.a06.pic=51"); # id(disp1).send_command_printf("thermostat.a06.pic=51");
} # }
- lambda: |- # - lambda: |-
if (id(hvac_mode_global) == 0) { # if (id(hvac_mode_global) == 0) {
id(disp1).send_command_printf("home.a51.pic=53"); # id(disp1).send_command_printf("home.a51.pic=53");
id(disp1).send_command_printf("thermostat.a51.pic=53"); # id(disp1).send_command_printf("thermostat.a51.pic=53");
id(disp1).send_command_printf("thermostat.a06.pic=49"); # id(disp1).send_command_printf("thermostat.a06.pic=49");
} else if (id(hvac_mode_global) == 1) { # } else if (id(hvac_mode_global) == 1) {
id(disp1).send_command_printf("home.a51.pic=65"); # id(disp1).send_command_printf("home.a51.pic=65");
id(disp1).send_command_printf("thermostat.a51.pic=65"); # id(disp1).send_command_printf("thermostat.a51.pic=65");
id(disp1).set_component_value("thermostat.a10",1); # id(disp1).set_component_value("thermostat.a10",1);
} # }
############################################################# #############################################################
##### CLOSE - DISPLAY START ##### ##### CLOSE - DISPLAY START #####