Merge branch 'Blackymas:dev' into dev
This commit is contained in:
@@ -32,11 +32,13 @@ blueprint:
|
|||||||
selector:
|
selector:
|
||||||
text: {}
|
text: {}
|
||||||
delay:
|
delay:
|
||||||
name: Delay to avoid sync problems (coming soon)
|
name: '# Delay to avoid sync problems'
|
||||||
description: 'Synchronization Problems may occur due to the NETWORK / WLAN. To avoid this problem enter your value for the delay (milliseconds)'
|
description: '# Synchronization Problems may occur due to the NETWORK / WLAN. To avoid this problem enter your value for the delay (milliseconds)'
|
||||||
default: '10'
|
default: '10'
|
||||||
selector:
|
selector:
|
||||||
text: {}
|
number:
|
||||||
|
min: 0
|
||||||
|
max: 100
|
||||||
sync_value_ha:
|
sync_value_ha:
|
||||||
name: Synchronization of all values from HA to NSPanel for Lightsetting and Coversetting Page.
|
name: Synchronization of all values from HA to NSPanel for Lightsetting and Coversetting Page.
|
||||||
description: 'Synchronization of values between HA and NSPanel for Lightsetting and Coversetting Page -> Maybe causes number jumps'
|
description: 'Synchronization of values between HA and NSPanel for Lightsetting and Coversetting Page -> Maybe causes number jumps'
|
||||||
@@ -60,6 +62,15 @@ blueprint:
|
|||||||
- label: 'Yes'
|
- label: 'Yes'
|
||||||
value: select_yes
|
value: select_yes
|
||||||
|
|
||||||
|
nspnael_temp_correction:
|
||||||
|
name: 'Nspanel temperature correction'
|
||||||
|
description: 'Here the temperature of the NSPanel temperature sensor can be adjusted.'
|
||||||
|
default: '0'
|
||||||
|
selector:
|
||||||
|
number:
|
||||||
|
min: -10
|
||||||
|
max: 10
|
||||||
|
|
||||||
##### WEATHER #####
|
##### WEATHER #####
|
||||||
weather:
|
weather:
|
||||||
name: Weather Integration
|
name: Weather Integration
|
||||||
@@ -748,6 +759,7 @@ variables:
|
|||||||
time: "{{ (as_timestamp(now()) | timestamp_custom('%H:%M')) }}"
|
time: "{{ (as_timestamp(now()) | timestamp_custom('%H:%M')) }}"
|
||||||
weather: !input "weather"
|
weather: !input "weather"
|
||||||
language: !input "language"
|
language: !input "language"
|
||||||
|
nspnael_temp_correction: !input "nspnael_temp_correction"
|
||||||
|
|
||||||
##### PUSH TO NEXTION DISPLAY #####
|
##### PUSH TO NEXTION DISPLAY #####
|
||||||
command_text_printf: "esphome.{{ nspanel_name }}_send_command_text_printf"
|
command_text_printf: "esphome.{{ nspanel_name }}_send_command_text_printf"
|
||||||
@@ -768,6 +780,7 @@ variables:
|
|||||||
tft_path: !input "tft_path"
|
tft_path: !input "tft_path"
|
||||||
|
|
||||||
##### GENERAL ENTITYS #####
|
##### GENERAL ENTITYS #####
|
||||||
|
nspanel_temp: sensor.{{ nspanel_name }}_temperature
|
||||||
humidity: !input "humidity"
|
humidity: !input "humidity"
|
||||||
hotwatertemp: !input "hotwatertemp"
|
hotwatertemp: !input "hotwatertemp"
|
||||||
outdoortemp: !input "outdoortemp"
|
outdoortemp: !input "outdoortemp"
|
||||||
@@ -1144,7 +1157,7 @@ trigger:
|
|||||||
- platform: event
|
- platform: event
|
||||||
event_type: state_changed
|
event_type: state_changed
|
||||||
event_data:
|
event_data:
|
||||||
entity_id: "{{ current_page }}"
|
entity_id: "{{ current_page in [1,2,3,4,5] }}"
|
||||||
id: weather_settings
|
id: weather_settings
|
||||||
|
|
||||||
##### Page Button - Trigger "button_page" Entity sync #####
|
##### Page Button - Trigger "button_page" Entity sync #####
|
||||||
@@ -1754,6 +1767,14 @@ action:
|
|||||||
component: home.humidity_state
|
component: home.humidity_state
|
||||||
message: "{{ states(humidity) |round(0) }}%"
|
message: "{{ states(humidity) |round(0) }}%"
|
||||||
|
|
||||||
|
##### NSPanel boot init - NSPanel Temp #####
|
||||||
|
- delay:
|
||||||
|
milliseconds: "{{ delay_value }}"
|
||||||
|
- service: "{{ command_text_printf }}"
|
||||||
|
data:
|
||||||
|
component: home.current_temp
|
||||||
|
message: "{{ states(nspanel_temp) }}°"
|
||||||
|
|
||||||
##### NSPanel boot init - Hotwater #####
|
##### NSPanel boot init - Hotwater #####
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
|
|||||||
651
esphome.yaml
651
esphome.yaml
@@ -1,9 +1,12 @@
|
|||||||
#############################################################
|
#####################################################################################################
|
||||||
##### START - SUBSTITUTIONS #####
|
##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint #####
|
||||||
#############################################################
|
##### ADVANCED CONFIG + FULL ESPHOME CODE! #####
|
||||||
|
##### PLEASE only make changes if it is necessary and also the required knowledge is available. #####
|
||||||
|
##### For normal use with the Blueprint, no changes are necessary. #####
|
||||||
|
#####################################################################################################
|
||||||
|
|
||||||
|
|
||||||
##### advanced config activate only when you know what you do #####
|
##### ADVANCED CONFIGURATION - activate only when you know what you do ##############################
|
||||||
# substitutions:
|
# substitutions:
|
||||||
# ## usage of secrets-file ## -> comment in ###### Change ME ######
|
# ## usage of secrets-file ## -> comment in ###### Change ME ######
|
||||||
# device_name: "nspanel-name" # Wird im Blueprint benötigt!
|
# device_name: "nspanel-name" # Wird im Blueprint benötigt!
|
||||||
@@ -19,49 +22,7 @@
|
|||||||
# dns: "10.0.0.138"
|
# dns: "10.0.0.138"
|
||||||
# domain: ".local"
|
# domain: ".local"
|
||||||
|
|
||||||
##### end of advanced config #####
|
##### END OF ADVANCED CONFIGURATION ##############################################################
|
||||||
|
|
||||||
###### EDIT THE BELOW ENTITIES FOR YOURS... depricated #######################################################################
|
|
||||||
##### - will be removed in future release - ignore it or set if exist ##################
|
|
||||||
# ha_hotwater_charge: switch.wwcharge
|
|
||||||
# ha_heating_system_flame: binary_sensor.flamestatus ##### Buderus Heizung Flamen-Status (Integration) #####
|
|
||||||
# ha_climate_thermostat_target_temp: sensor.nspanel_target_temp ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) #####
|
|
||||||
# ha_climate_thermostat: climate.nspanel_name ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) #####
|
|
||||||
#########################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### CLOSE - SUBSTITUTIONS #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
##
|
|
||||||
###
|
|
||||||
#############################################################################################################################################################################################
|
|
||||||
###
|
|
||||||
##
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### START - Settings #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#########################################
|
|
||||||
|
|
||||||
##### Functionality for the Nextion display #####
|
|
||||||
external_components:
|
|
||||||
- source: github://pr#2956
|
|
||||||
components: [nextion]
|
|
||||||
refresh: 1h
|
|
||||||
|
|
||||||
##### ESP home CONFIG #####
|
|
||||||
esphome:
|
|
||||||
name: ${device_name}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### TYPE OF ESP BOARD #####
|
|
||||||
esp32:
|
|
||||||
board: esp32dev
|
|
||||||
|
|
||||||
##### WIFI SETUP #####
|
##### WIFI SETUP #####
|
||||||
wifi:
|
wifi:
|
||||||
@@ -80,6 +41,20 @@ wifi:
|
|||||||
ssid: "${device_name}"
|
ssid: "${device_name}"
|
||||||
password: ${wifi_password}
|
password: ${wifi_password}
|
||||||
|
|
||||||
|
##### Functionality for the Nextion display #####
|
||||||
|
external_components:
|
||||||
|
- source: github://pr#2956
|
||||||
|
components: [nextion]
|
||||||
|
refresh: 1h
|
||||||
|
|
||||||
|
##### ESPHOME CONFIGURATION #####
|
||||||
|
esphome:
|
||||||
|
name: ${device_name}
|
||||||
|
|
||||||
|
##### TYPE OF ESP BOARD #####
|
||||||
|
esp32:
|
||||||
|
board: esp32dev
|
||||||
|
|
||||||
captive_portal:
|
captive_portal:
|
||||||
|
|
||||||
web_server:
|
web_server:
|
||||||
@@ -88,7 +63,7 @@ web_server:
|
|||||||
username: admin
|
username: admin
|
||||||
password: ${ota_password}
|
password: ${ota_password}
|
||||||
|
|
||||||
##### OTA (Over the air updates) password #####
|
##### OTA PASSWORD #####
|
||||||
ota:
|
ota:
|
||||||
password: ${ota_password}
|
password: ${ota_password}
|
||||||
safe_mode: true
|
safe_mode: true
|
||||||
@@ -120,35 +95,14 @@ uart:
|
|||||||
baud_rate: 115200
|
baud_rate: 115200
|
||||||
id: tf_uart
|
id: tf_uart
|
||||||
|
|
||||||
###### A reboot button is always useful #####
|
###### REBOOT BUTTON #####
|
||||||
button:
|
button:
|
||||||
- platform: restart
|
- platform: restart
|
||||||
name: ${device_name} Restart
|
name: ${device_name} Restart
|
||||||
id: restart_nspanel
|
id: restart_nspanel
|
||||||
|
|
||||||
|
|
||||||
|
##### START - API CONFIGURATION #####
|
||||||
|
|
||||||
#########################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### CLOSE - Settings #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
##
|
|
||||||
###
|
|
||||||
#############################################################################################################################################################################################
|
|
||||||
###
|
|
||||||
##
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### START - API #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#########################################
|
|
||||||
|
|
||||||
api:
|
api:
|
||||||
services:
|
services:
|
||||||
|
|
||||||
@@ -157,14 +111,14 @@ api:
|
|||||||
then:
|
then:
|
||||||
- lambda: 'id(disp1)->upload_tft();'
|
- lambda: 'id(disp1)->upload_tft();'
|
||||||
|
|
||||||
##### Service to send a command "printf" directly to the display. Useful for testing #####
|
##### Service to send a command "printf" directly to the display #####
|
||||||
- service: send_command_printf
|
- service: send_command_printf
|
||||||
variables:
|
variables:
|
||||||
cmd: string
|
cmd: string
|
||||||
then:
|
then:
|
||||||
- lambda: 'id(disp1).send_command_printf("%s", cmd.c_str());'
|
- lambda: 'id(disp1).send_command_printf("%s", cmd.c_str());'
|
||||||
|
|
||||||
##### Service to send a command "text_printf" directly to the display. Useful for testing #####
|
##### Service to send a command "text_printf" directly to the display #####
|
||||||
- service: send_command_text_printf
|
- service: send_command_text_printf
|
||||||
variables:
|
variables:
|
||||||
component: string
|
component: string
|
||||||
@@ -174,7 +128,7 @@ api:
|
|||||||
switch.is_on: nextion_init
|
switch.is_on: nextion_init
|
||||||
- lambda: 'id(disp1).set_component_text_printf(component.c_str(), "%s", message.c_str());'
|
- lambda: 'id(disp1).set_component_text_printf(component.c_str(), "%s", message.c_str());'
|
||||||
|
|
||||||
##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing #####
|
##### Service to send a command "component_value (Dualstate Button)" directly to the display #####
|
||||||
- service: send_command_value
|
- service: send_command_value
|
||||||
variables:
|
variables:
|
||||||
component: string
|
component: string
|
||||||
@@ -184,7 +138,7 @@ api:
|
|||||||
switch.is_on: nextion_init
|
switch.is_on: nextion_init
|
||||||
- lambda: 'id(disp1).set_component_value(component.c_str(), message);'
|
- lambda: 'id(disp1).set_component_value(component.c_str(), message);'
|
||||||
|
|
||||||
##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing #####
|
##### Service to send a command "hide componente" directly to the display #####
|
||||||
- service: send_command_hide
|
- service: send_command_hide
|
||||||
variables:
|
variables:
|
||||||
component: string
|
component: string
|
||||||
@@ -193,7 +147,16 @@ api:
|
|||||||
switch.is_on: nextion_init
|
switch.is_on: nextion_init
|
||||||
- lambda: 'id(disp1).hide_component(component.c_str());'
|
- lambda: 'id(disp1).hide_component(component.c_str());'
|
||||||
|
|
||||||
##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing #####
|
##### Service to send a command "show componente" directly to the display #####
|
||||||
|
- service: send_command_show
|
||||||
|
variables:
|
||||||
|
component: string
|
||||||
|
then:
|
||||||
|
- wait_until:
|
||||||
|
switch.is_on: nextion_init
|
||||||
|
- lambda: 'id(disp1).show_component(component.c_str());'
|
||||||
|
|
||||||
|
##### Service to send a command "font color" directly to the display #####
|
||||||
- service: send_command_font_color
|
- service: send_command_font_color
|
||||||
variables:
|
variables:
|
||||||
component: string
|
component: string
|
||||||
@@ -202,7 +165,7 @@ api:
|
|||||||
- wait_until:
|
- wait_until:
|
||||||
switch.is_on: nextion_init
|
switch.is_on: nextion_init
|
||||||
- lambda: 'id(disp1).set_component_font_color(component.c_str(), message);'
|
- lambda: 'id(disp1).set_component_font_color(component.c_str(), message);'
|
||||||
##### Service to send a command "component_value (Dualstate Button)" directly to the display. Useful for testing #####
|
##### Service to send a command "background color" directly to the display #####
|
||||||
- service: send_command_background_color
|
- service: send_command_background_color
|
||||||
variables:
|
variables:
|
||||||
component: string
|
component: string
|
||||||
@@ -212,40 +175,10 @@ api:
|
|||||||
switch.is_on: nextion_init
|
switch.is_on: nextion_init
|
||||||
- lambda: 'id(disp1).set_component_background_color(component.c_str(), message);'
|
- lambda: 'id(disp1).set_component_background_color(component.c_str(), message);'
|
||||||
|
|
||||||
#########################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### CLOSE - API #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
##
|
|
||||||
###
|
|
||||||
#############################################################################################################################################################################################
|
|
||||||
###
|
|
||||||
##
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### START - GLOBALS #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#########################################
|
|
||||||
|
|
||||||
|
##### START - GLOBALS CONFIGURATION #####
|
||||||
globals:
|
globals:
|
||||||
|
|
||||||
# ##### Save Target Temp #####
|
|
||||||
# - id: climate_target_temp_val_global
|
|
||||||
# type: float
|
|
||||||
# restore_value: true
|
|
||||||
# initial_value: '12'
|
|
||||||
|
|
||||||
# ##### Save Thermostat PIC Position #####
|
|
||||||
# - id: climate_slider_val_global
|
|
||||||
# type: int
|
|
||||||
# restore_value: true
|
|
||||||
# initial_value: '0'
|
|
||||||
|
|
||||||
##### Save Display Brightness for NSPanel reboot #####
|
##### Save Display Brightness for NSPanel reboot #####
|
||||||
- id: display_brightness_global
|
- id: display_brightness_global
|
||||||
type: int
|
type: int
|
||||||
@@ -264,18 +197,6 @@ globals:
|
|||||||
restore_value: true
|
restore_value: true
|
||||||
initial_value: '0'
|
initial_value: '0'
|
||||||
|
|
||||||
# ##### Save State Heating Room #####
|
|
||||||
# - id: heating_room_global
|
|
||||||
# type: int
|
|
||||||
# restore_value: true
|
|
||||||
# initial_value: '0'
|
|
||||||
|
|
||||||
##### Save State HVAC #####
|
|
||||||
# - id: hvac_mode_global
|
|
||||||
# type: int
|
|
||||||
# restore_value: true
|
|
||||||
# initial_value: '0'
|
|
||||||
|
|
||||||
##### lastclick_general State #####
|
##### lastclick_general State #####
|
||||||
- id: lastclick_general_global
|
- id: lastclick_general_global
|
||||||
type: std::string
|
type: std::string
|
||||||
@@ -300,26 +221,8 @@ globals:
|
|||||||
restore_value: no
|
restore_value: no
|
||||||
initial_value: ''
|
initial_value: ''
|
||||||
|
|
||||||
#########################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### CLOSE - GLOBALS #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
##
|
|
||||||
###
|
|
||||||
#############################################################################################################################################################################################
|
|
||||||
###
|
|
||||||
##
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### START - BINARY SENSOR #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#########################################
|
|
||||||
|
|
||||||
|
##### START - BINARY SENSOR CONFIGURATION #####
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
|
|
||||||
###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY#####
|
###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY#####
|
||||||
@@ -336,42 +239,6 @@ binary_sensor:
|
|||||||
number: 27
|
number: 27
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
##### THERMOSTAT - BUTTON DECREASES CLIMATE TARGET TEMPERATURE IN HA #####
|
|
||||||
# - platform: nextion
|
|
||||||
# name: ${device_name} Climate Target DOWN
|
|
||||||
# page_id: 6
|
|
||||||
# component_id: 13
|
|
||||||
# internal: true
|
|
||||||
# on_click:
|
|
||||||
# - homeassistant.service:
|
|
||||||
# service: climate.set_temperature
|
|
||||||
# data_template:
|
|
||||||
# entity_id: ${ha_climate_thermostat}
|
|
||||||
# temperature: !lambda return id(climate_target_temp_val_global) - 0.5;
|
|
||||||
|
|
||||||
##### THERMOSTAT - BUTTON INCREASES CLIMATE TARGET TEMPERATURE IN HA #####
|
|
||||||
# - platform: nextion
|
|
||||||
# name: ${device_name} Climate Target UP
|
|
||||||
# page_id: 6
|
|
||||||
# component_id: 14
|
|
||||||
# internal: true
|
|
||||||
# on_click:
|
|
||||||
# - homeassistant.service:
|
|
||||||
# service: climate.set_temperature
|
|
||||||
# data_template:
|
|
||||||
# entity_id: ${ha_climate_thermostat}
|
|
||||||
# temperature: !lambda return id(climate_target_temp_val_global) + 0.5;
|
|
||||||
|
|
||||||
##### THERMOSTAT - BUTTON ON / OFF Heating #####
|
|
||||||
# - platform: nextion
|
|
||||||
# name: ${device_name} Heating Room State
|
|
||||||
# id: heating_room_state
|
|
||||||
# page_id: 6
|
|
||||||
# component_id: 15
|
|
||||||
# internal: true
|
|
||||||
# on_click:
|
|
||||||
# - switch.toggle: hvac_mode
|
|
||||||
|
|
||||||
##### Restart NSPanel Button #####
|
##### Restart NSPanel Button #####
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
name: ${device_name} Restart
|
name: ${device_name} Restart
|
||||||
@@ -401,26 +268,8 @@ binary_sensor:
|
|||||||
data:
|
data:
|
||||||
entity_id: ${ha_hotwater_charge}
|
entity_id: ${ha_hotwater_charge}
|
||||||
|
|
||||||
#########################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### CLOSE - BINARY SENSOR #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
##
|
|
||||||
###
|
|
||||||
#############################################################################################################################################################################################
|
|
||||||
###
|
|
||||||
##
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### START - SENSOR #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#########################################
|
|
||||||
|
|
||||||
|
##### START - SENSOR CONFIGURATION #####
|
||||||
sensor:
|
sensor:
|
||||||
|
|
||||||
##### Uptime #####
|
##### Uptime #####
|
||||||
@@ -456,230 +305,12 @@ sensor:
|
|||||||
b_constant: 3950
|
b_constant: 3950
|
||||||
reference_temperature: 25°C
|
reference_temperature: 25°C
|
||||||
reference_resistance: 10kOhm
|
reference_resistance: 10kOhm
|
||||||
on_value:
|
# on_value:
|
||||||
then:
|
# then:
|
||||||
- wait_until:
|
# - wait_until:
|
||||||
switch.is_on: nextion_init
|
# switch.is_on: nextion_init
|
||||||
- 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);
|
||||||
|
|
||||||
##### THERMOSTAT CLIMATE TARGET TEMPERATURE FROM HA #####
|
|
||||||
# - platform: homeassistant
|
|
||||||
# id: ha_climate_target_temp
|
|
||||||
# entity_id: ${ha_climate_thermostat_target_temp}
|
|
||||||
# on_value:
|
|
||||||
# then:
|
|
||||||
# - wait_until:
|
|
||||||
# switch.is_on: nextion_init
|
|
||||||
# - globals.set:
|
|
||||||
# id: climate_target_temp_val_global
|
|
||||||
# value: !lambda 'return float(x);'
|
|
||||||
# - lambda: id(disp1).set_component_text_printf("climate.target_temp", "%.1f", id(climate_target_temp_val_global));
|
|
||||||
# # THERMO PROGRESS CIRCLE, broken into 3 images to create space for the temperatures in the center.
|
|
||||||
# - lambda: |-
|
|
||||||
# int left=16; // 16 is empty left.
|
|
||||||
# int mid=17; // 17 is empty mid.
|
|
||||||
# int right=18; // 18 is empty right.
|
|
||||||
# if (id(climate_target_temp_val_global) == 13) {
|
|
||||||
# left=16;
|
|
||||||
# mid=17;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 13.5) {
|
|
||||||
# left=19;
|
|
||||||
# mid=17;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 14) {
|
|
||||||
# left=20;
|
|
||||||
# mid=17;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 14.5) {
|
|
||||||
# left=21;
|
|
||||||
# mid=17;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 15) {
|
|
||||||
# left=22;
|
|
||||||
# mid=17;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 15.5) {
|
|
||||||
# left=23;
|
|
||||||
# mid=17;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 16) {
|
|
||||||
# left=24;
|
|
||||||
# mid=17;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 16.5) {
|
|
||||||
# left=25;
|
|
||||||
# mid=17;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 17) {
|
|
||||||
# left=26;
|
|
||||||
# mid=17;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 17.5) {
|
|
||||||
# left=27;
|
|
||||||
# mid=17;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 18) {
|
|
||||||
# left=28;
|
|
||||||
# mid=17;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 18.5) {
|
|
||||||
# left=29;
|
|
||||||
# mid=30;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 19) {
|
|
||||||
# left=29;
|
|
||||||
# mid=31;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 19.5) {
|
|
||||||
# left=29;
|
|
||||||
# mid=32;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 20) {
|
|
||||||
# left=29;
|
|
||||||
# mid=33;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 20.5) {
|
|
||||||
# left=29;
|
|
||||||
# mid=34;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 21) {
|
|
||||||
# left=29;
|
|
||||||
# mid=35;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 21.5) {
|
|
||||||
# left=29;
|
|
||||||
# mid=36;
|
|
||||||
# right=18;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 22) {
|
|
||||||
# left=29;
|
|
||||||
# mid=37;
|
|
||||||
# right=38;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 22.5) {
|
|
||||||
# left=29;
|
|
||||||
# mid=37;
|
|
||||||
# right=39;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 23) {
|
|
||||||
# left=29;
|
|
||||||
# mid=37;
|
|
||||||
# right=40;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 23.5) {
|
|
||||||
# left=29;
|
|
||||||
# mid=37;
|
|
||||||
# right=41;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 24) {
|
|
||||||
# left=29;
|
|
||||||
# mid=37;
|
|
||||||
# right=42;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 24.5) {
|
|
||||||
# left=29;
|
|
||||||
# mid=37;
|
|
||||||
# right=43;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 25) {
|
|
||||||
# left=29;
|
|
||||||
# mid=37;
|
|
||||||
# right=44;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 25.5) {
|
|
||||||
# left=29;
|
|
||||||
# mid=37;
|
|
||||||
# right=45;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 26) {
|
|
||||||
# left=29;
|
|
||||||
# mid=37;
|
|
||||||
# right=46;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 26.5) {
|
|
||||||
# left=29;
|
|
||||||
# mid=37;
|
|
||||||
# right=47;
|
|
||||||
# } else if (id(climate_target_temp_val_global) == 27) {
|
|
||||||
# left=29;
|
|
||||||
# mid=37;
|
|
||||||
# right=48;
|
|
||||||
# }
|
|
||||||
# // sends the 3 images to the display
|
|
||||||
# id(disp1).send_command_printf("climate.a01.pic=%i", left);
|
|
||||||
# id(disp1).send_command_printf("climate.a02.pic=%i", mid);
|
|
||||||
# id(disp1).send_command_printf("climate.a03.pic=%i", right);
|
|
||||||
|
|
||||||
###### TARGET TEMPERATURE GET VALUE FROM NEXTION CIRCLE SLIDER AND SET GLOBAL VARIBLE #####
|
|
||||||
# - platform: nextion
|
|
||||||
# id: climate_circleslider
|
|
||||||
# name: ${device_name} Climate circleslider
|
|
||||||
# variable_name: climateslider
|
|
||||||
# internal: true
|
|
||||||
# on_value:
|
|
||||||
# then:
|
|
||||||
# - wait_until:
|
|
||||||
# switch.is_on: nextion_init
|
|
||||||
# - globals.set:
|
|
||||||
# id: climate_slider_val_global
|
|
||||||
# value: !lambda 'return int(x);'
|
|
||||||
# - lambda: |-
|
|
||||||
# if (id(climate_slider_val_global) == 0) {
|
|
||||||
# id(climate_target_temp_val_global) = 13;
|
|
||||||
# } else if (id(climate_slider_val_global) == 1) {
|
|
||||||
# id(climate_target_temp_val_global) = 13.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 2) {
|
|
||||||
# id(climate_target_temp_val_global) = 14;
|
|
||||||
# } else if (id(climate_slider_val_global) == 3) {
|
|
||||||
# id(climate_target_temp_val_global) = 14.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 4) {
|
|
||||||
# id(climate_target_temp_val_global) = 15;
|
|
||||||
# } else if (id(climate_slider_val_global) == 5) {
|
|
||||||
# id(climate_target_temp_val_global) = 15.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 6) {
|
|
||||||
# id(climate_target_temp_val_global) = 16;
|
|
||||||
# } else if (id(climate_slider_val_global) == 7) {
|
|
||||||
# id(climate_target_temp_val_global) = 16.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 8) {
|
|
||||||
# id(climate_target_temp_val_global) = 17;
|
|
||||||
# } else if (id(climate_slider_val_global) == 9) {
|
|
||||||
# id(climate_target_temp_val_global) = 17.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 10) {
|
|
||||||
# id(climate_target_temp_val_global) = 18;
|
|
||||||
# } else if (id(climate_slider_val_global) == 11) {
|
|
||||||
# id(climate_target_temp_val_global) = 18.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 12) {
|
|
||||||
# id(climate_target_temp_val_global) = 19;
|
|
||||||
# } else if (id(climate_slider_val_global) == 13) {
|
|
||||||
# id(climate_target_temp_val_global) = 19.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 14) {
|
|
||||||
# id(climate_target_temp_val_global) = 20;
|
|
||||||
# } else if (id(climate_slider_val_global) == 15) {
|
|
||||||
# id(climate_target_temp_val_global) = 20.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 16) {
|
|
||||||
# id(climate_target_temp_val_global) = 21;
|
|
||||||
# } else if (id(climate_slider_val_global) == 17) {
|
|
||||||
# id(climate_target_temp_val_global) = 21.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 18) {
|
|
||||||
# id(climate_target_temp_val_global) = 22;
|
|
||||||
# } else if (id(climate_slider_val_global) == 19) {
|
|
||||||
# id(climate_target_temp_val_global) = 22.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 20) {
|
|
||||||
# id(climate_target_temp_val_global) = 23;
|
|
||||||
# } else if (id(climate_slider_val_global) == 21) {
|
|
||||||
# id(climate_target_temp_val_global) = 23.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 22) {
|
|
||||||
# id(climate_target_temp_val_global) = 24;
|
|
||||||
# } else if (id(climate_slider_val_global) == 23) {
|
|
||||||
# id(climate_target_temp_val_global) = 24.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 24) {
|
|
||||||
# id(climate_target_temp_val_global) = 25;
|
|
||||||
# } else if (id(climate_slider_val_global) == 25) {
|
|
||||||
# id(climate_target_temp_val_global) = 25.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 26) {
|
|
||||||
# id(climate_target_temp_val_global) = 26;
|
|
||||||
# } else if (id(climate_slider_val_global) == 27) {
|
|
||||||
# id(climate_target_temp_val_global) = 26.5;
|
|
||||||
# } else if (id(climate_slider_val_global) == 28) {
|
|
||||||
# id(climate_target_temp_val_global) = 27;
|
|
||||||
# }
|
|
||||||
# - homeassistant.service:
|
|
||||||
# service: climate.set_temperature
|
|
||||||
# data_template:
|
|
||||||
# entity_id: ${ha_climate_thermostat}
|
|
||||||
# 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
|
||||||
@@ -725,26 +356,7 @@ sensor:
|
|||||||
- lambda: return int(x);
|
- lambda: return int(x);
|
||||||
|
|
||||||
|
|
||||||
#########################################
|
##### START - TEXT SENSOR CONFIGURATION #####
|
||||||
#
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### CLOSE - SENSOR #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
##
|
|
||||||
###
|
|
||||||
#############################################################################################################################################################################################
|
|
||||||
###
|
|
||||||
##
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### START - TEXT SENSOR#####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#########################################
|
|
||||||
|
|
||||||
text_sensor:
|
text_sensor:
|
||||||
|
|
||||||
##### ESPhome version used to compile the app #####
|
##### ESPhome version used to compile the app #####
|
||||||
@@ -763,11 +375,6 @@ text_sensor:
|
|||||||
name: ${device_name} BSSID
|
name: ${device_name} BSSID
|
||||||
disabled_by_default: true
|
disabled_by_default: true
|
||||||
|
|
||||||
##### SUN SENSOR FROM HA #####
|
|
||||||
# - platform: homeassistant
|
|
||||||
# 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
|
||||||
nextion_id: disp1
|
nextion_id: disp1
|
||||||
@@ -852,59 +459,8 @@ text_sensor:
|
|||||||
id: lastclick_climatesettings_global
|
id: lastclick_climatesettings_global
|
||||||
value: !lambda return x;
|
value: !lambda return x;
|
||||||
|
|
||||||
##### HEATING System ICON #####
|
|
||||||
# - platform: homeassistant
|
|
||||||
# entity_id: ${ha_heating_system_flame}
|
|
||||||
# name: "Heating System"
|
|
||||||
# id: heating_system
|
|
||||||
# on_value:
|
|
||||||
# then:
|
|
||||||
# - wait_until:
|
|
||||||
# switch.is_on: nextion_init
|
|
||||||
# - lambda: |-
|
|
||||||
# int symbol=53; // 53 is a blank image 20x20
|
|
||||||
# if (id(heating_system).state == "on") {
|
|
||||||
# symbol=64;
|
|
||||||
# }
|
|
||||||
# id(disp1).send_command_printf("home.a50.pic=%i", symbol);
|
|
||||||
# id(disp1).send_command_printf("climate.a50.pic=%i", symbol);
|
|
||||||
|
|
||||||
##### Hotwater Charge ICON #####
|
##### START - SWITCH CONFIGURATION #####
|
||||||
# - platform: homeassistant
|
|
||||||
# entity_id: ${ha_hotwater_charge}
|
|
||||||
# name: "Hotwater Charge"
|
|
||||||
# id: hotwater_charge
|
|
||||||
# on_value:
|
|
||||||
# then:
|
|
||||||
# - wait_until:
|
|
||||||
# switch.is_on: nextion_init
|
|
||||||
# - lambda: |-
|
|
||||||
# if (id(hotwater_charge).state == "on") {
|
|
||||||
# id(disp1).set_component_value("climate.hotwater",1);
|
|
||||||
# } else {
|
|
||||||
# id(disp1).set_component_value("climate.hotwater",0);
|
|
||||||
# }
|
|
||||||
|
|
||||||
#########################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### CLOSE - TEXT SENSOR #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
##
|
|
||||||
###
|
|
||||||
#############################################################################################################################################################################################
|
|
||||||
###
|
|
||||||
##
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### START - SWITCH #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#########################################
|
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
|
|
||||||
# ##### Restart switch ######
|
# ##### Restart switch ######
|
||||||
@@ -946,47 +502,6 @@ switch:
|
|||||||
id: relay_2
|
id: relay_2
|
||||||
pin:
|
pin:
|
||||||
number: 19
|
number: 19
|
||||||
|
|
||||||
##### Switch Climate HVAC Mode #####
|
|
||||||
# - platform: template
|
|
||||||
# device_class: switch
|
|
||||||
# name: ${device_name} hvac Mode
|
|
||||||
# id: hvac_mode
|
|
||||||
# restore_state: true
|
|
||||||
# assumed_state: false
|
|
||||||
# optimistic: true
|
|
||||||
# on_turn_off:
|
|
||||||
# - lambda: id(disp1).set_component_value("climate.heating",0);
|
|
||||||
# - globals.set:
|
|
||||||
# id: hvac_mode_global
|
|
||||||
# value: '0'
|
|
||||||
# - homeassistant.service:
|
|
||||||
# service: climate.set_hvac_mode
|
|
||||||
# data_template:
|
|
||||||
# entity_id: $ha_climate_thermostat
|
|
||||||
# hvac_mode: 'off'
|
|
||||||
# - lambda: id(disp1).send_command_printf("climate.heating_state.pic=49");
|
|
||||||
# - lambda: id(disp1).send_command_printf("home.a51.pic=53");
|
|
||||||
# - lambda: id(disp1).send_command_printf("climate.a51.pic=53");
|
|
||||||
# on_turn_on:
|
|
||||||
# - lambda: id(disp1).set_component_value("climate.heating",1);
|
|
||||||
# - globals.set:
|
|
||||||
# id: hvac_mode_global
|
|
||||||
# value: '1'
|
|
||||||
# - homeassistant.service:
|
|
||||||
# service: climate.set_hvac_mode
|
|
||||||
# data_template:
|
|
||||||
# entity_id: $ha_climate_thermostat
|
|
||||||
# hvac_mode: 'heat'
|
|
||||||
# - lambda: |-
|
|
||||||
# if (id(heating_room_global) == 0)
|
|
||||||
# {
|
|
||||||
# id(disp1).send_command_printf("climate.heating_state.pic=50");
|
|
||||||
# } else if (id(heating_room_global) == 1) {
|
|
||||||
# id(disp1).send_command_printf("climate.heating_state.pic=51");
|
|
||||||
# }
|
|
||||||
# - lambda: id(disp1).send_command_printf("home.a51.pic=65");
|
|
||||||
# - lambda: id(disp1).send_command_printf("climate.a51.pic=65");
|
|
||||||
|
|
||||||
##### DISPLAY ALWAYS ON #####
|
##### DISPLAY ALWAYS ON #####
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
@@ -1020,26 +535,8 @@ switch:
|
|||||||
value: '1'
|
value: '1'
|
||||||
- lambda: id(disp1).set_component_value("settings.a02",1);
|
- lambda: id(disp1).set_component_value("settings.a02",1);
|
||||||
|
|
||||||
#########################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### CLOSE - SWITCH #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
##
|
|
||||||
###
|
|
||||||
#############################################################################################################################################################################################
|
|
||||||
###
|
|
||||||
##
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### START - NUMBER #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#########################################
|
|
||||||
|
|
||||||
|
##### START - NUMBER CONFIGURATION #####
|
||||||
number:
|
number:
|
||||||
|
|
||||||
##### SCREEN BRIGHTNESS #####
|
##### SCREEN BRIGHTNESS #####
|
||||||
@@ -1079,26 +576,8 @@ number:
|
|||||||
id: display_dim_brightness_global
|
id: display_dim_brightness_global
|
||||||
value: !lambda 'return int(x);'
|
value: !lambda 'return int(x);'
|
||||||
|
|
||||||
#########################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### CLOSE - NUMBER #####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
##
|
|
||||||
###
|
|
||||||
#############################################################################################################################################################################################
|
|
||||||
###
|
|
||||||
##
|
|
||||||
#
|
|
||||||
#############################################################
|
|
||||||
##### START - DISPLAY START#####
|
|
||||||
#############################################################
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#########################################
|
|
||||||
|
|
||||||
|
##### START - DISPLAY START CONFIGURATION #####
|
||||||
display:
|
display:
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
id: disp1
|
id: disp1
|
||||||
@@ -1134,27 +613,3 @@ display:
|
|||||||
{
|
{
|
||||||
id(disp1).set_component_value("settings.a02",1);
|
id(disp1).set_component_value("settings.a02",1);
|
||||||
}
|
}
|
||||||
# - lambda: |-
|
|
||||||
# id(disp1).send_command_printf("home.a50.pic=53");
|
|
||||||
# id(disp1).send_command_printf("climate.a50.pic=53");
|
|
||||||
# id(disp1).send_command_printf("climate.heating_state.pic=50");
|
|
||||||
# if (id(heating_room_global) == 1)
|
|
||||||
# {
|
|
||||||
# id(disp1).send_command_printf("home.a52.pic=66");
|
|
||||||
# id(disp1).send_command_printf("climate.a52.pic=66");
|
|
||||||
# id(disp1).send_command_printf("climate.heating_state.pic=51");
|
|
||||||
# }
|
|
||||||
# - lambda: |-
|
|
||||||
# if (id(hvac_mode_global) == 0) {
|
|
||||||
# id(disp1).send_command_printf("home.a51.pic=53");
|
|
||||||
# id(disp1).send_command_printf("climate.a51.pic=53");
|
|
||||||
# id(disp1).send_command_printf("climate.heating_state.pic=49");
|
|
||||||
# } else if (id(hvac_mode_global) == 1) {
|
|
||||||
# id(disp1).send_command_printf("home.a51.pic=65");
|
|
||||||
# id(disp1).send_command_printf("climate.a51.pic=65");
|
|
||||||
# id(disp1).set_component_value("climate.heating",1);
|
|
||||||
# }
|
|
||||||
|
|
||||||
#############################################################
|
|
||||||
##### CLOSE - DISPLAY START #####
|
|
||||||
#############################################################
|
|
||||||
Reference in New Issue
Block a user