upd: esphome.yaml
This commit is contained in:
587
esphome.yaml
587
esphome.yaml
@@ -2,24 +2,51 @@
|
|||||||
##### START - SUBSTITUTIONS #####
|
##### START - SUBSTITUTIONS #####
|
||||||
#############################################################
|
#############################################################
|
||||||
substitutions:
|
substitutions:
|
||||||
##### GENEREL CONFIG #############################################################################################
|
##### GENEREL CONFIG MOVED TO ESPHOME SECRETS FILE -> PASTE THIS BLOCK AND MODIFY FOR YOUR NEEDS ########
|
||||||
node_name: nspanel-buero # $node_name
|
##### This way you don't need to modify this file anymore
|
||||||
device_name: NSPanel Buero # $device_name
|
# # Blackymas-NSPanel
|
||||||
|
# nspanel_update_url: 'http://1.2.3.4:8123/local/nspanel/nspanel.tft'
|
||||||
|
# nspanel_ota_password: "OTA-PASSWORD"
|
||||||
|
# nspanel_wifi_password: "WIFI-PASSWORD"
|
||||||
|
# nspanel_web_password: "WEBSERVER-PASSWORD"
|
||||||
|
# nspanel_wifi_ssid: "SSID"
|
||||||
|
# nspanel_node_name: "nspanel01"
|
||||||
|
# nspanel_device_name: "NSPanel01"
|
||||||
|
# nspanel_ip: '1.2.3.4'
|
||||||
|
# nspanel_gateway: '1.2.3.4'
|
||||||
|
# nspanel_subnet: '255.255.255.0'
|
||||||
|
# nspanel_dns: '1.2.3.4'
|
||||||
|
# nspanel_domain: ".lan"
|
||||||
|
# nspanel_hotwater_charge: switch.wwontime
|
||||||
|
# nspanel_ha_heating_system_flame: binary_sensor.ems_boiler_burngas
|
||||||
|
# nspanel_ha_climate_thermostat_target_temp: sensor.xxxx
|
||||||
|
# nspanel_ha_climate_thermostat: climate.xxxxx
|
||||||
|
###### END OF SECRETS BLOCK TO PASTE ####################################################################
|
||||||
|
|
||||||
wifi_ssid: !secret wifi_ssid # add in your esphome secrets file.
|
|
||||||
wifi_password: !secret wifi_password # add in your esphome secrets file.
|
|
||||||
ota_password: !secret ota_password # add in your esphome secrets file.
|
node_name: !secret nspanel_node_name # $node_name
|
||||||
# nextion_update_url: !secret nextion_update_url_buero # add in your esphome secrets file.
|
device_name: !secret nspanel_device_name # $device_name
|
||||||
nextion_update_url: "http://192.168.4.250:8123/local/nspanel/buero/nspanel_buero.tft"
|
ip: !secret nspanel_ip # static ip
|
||||||
###### EDIT THE BELOW ENTITIES FOR YOURS... #######################################################################
|
gw: !secret nspanel_gateway
|
||||||
|
subnet: !secret nspanel_subnet
|
||||||
|
dns: !secret nspanel_dns
|
||||||
|
domain: !secret nspanel_domain
|
||||||
|
|
||||||
|
wifi_ssid: !secret nspanel_wifi_ssid # add in your esphome secrets file.
|
||||||
|
wifi_password: !secret nspanel_wifi_password # add in your esphome secrets file.
|
||||||
|
ota_password: !secret nspanel_ota_password # add in your esphome secrets file.
|
||||||
|
nextion_update_url: !secret nspanel_update_url # add in your esphome secrets file.
|
||||||
|
webserver_password: !secret nspanel_web_password
|
||||||
|
###### EDIT THE BELOW ENTITIES FOR YOURS... #######################################################################
|
||||||
|
|
||||||
#ha_weekday: sensor.wochentag ##### Sensor Wochentag generiert in HA (custom_configuration -> nspanel) #####
|
#ha_weekday: sensor.wochentag ##### Sensor Wochentag generiert in HA (custom_configuration -> nspanel) #####
|
||||||
#ha_outdoor_temp: sensor.terrasse_garage_motion_sensor_temperature ##### Temperatur von Bewegungsmelder Outdoor (Zigbee2Mqtt) #####
|
#ha_outdoor_temp: sensor.terrasse_garage_motion_sensor_temperature ##### Temperatur von Bewegungsmelder Outdoor (Zigbee2Mqtt) #####
|
||||||
#ha_hotwater_temp: sensor.hotwater_temp ##### Buderus Heizung Warmwasser Temperatur (Integration) #####
|
#ha_hotwater_temp: sensor.hotwater_temp ##### Buderus Heizung Warmwasser Temperatur (Integration) #####
|
||||||
ha_hotwater_charge: switch.charge
|
ha_hotwater_charge: !secret nspanel_hotwater_charge
|
||||||
ha_heating_system_flame: binary_sensor.flamestatus ##### Buderus Heizung Flamen-Status (Integration) #####
|
ha_heating_system_flame: !secret nspanel_ha_heating_system_flame ##### Buderus Heizung Flamen-Status (Integration) #####
|
||||||
ha_climate_thermostat_target_temp: sensor.nspanel_buro_target_temp ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) #####
|
ha_climate_thermostat_target_temp: !secret nspanel_ha_climate_thermostat_target_temp ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) #####
|
||||||
ha_climate_thermostat: climate.nspanel_buro ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) #####
|
ha_climate_thermostat: !secret nspanel_ha_climate_thermostat ##### Climate Thermostat generiert in HA (custom_configuration -> nspanel) #####
|
||||||
#ha_humidity: sensor.kinderzimmer_lea_temperatur_sensor_humidity
|
#ha_humidity: sensor.kinderzimmer_lea_temperatur_sensor_humidity
|
||||||
#########################################
|
#########################################
|
||||||
#
|
#
|
||||||
@@ -49,8 +76,8 @@ external_components:
|
|||||||
|
|
||||||
##### ESP home CONFIG #####
|
##### ESP home CONFIG #####
|
||||||
esphome:
|
esphome:
|
||||||
name: $node_name
|
name: ${node_name}
|
||||||
comment: $device_name
|
comment: ${device_name}
|
||||||
|
|
||||||
##### TYPE OF ESP BOARD #####
|
##### TYPE OF ESP BOARD #####
|
||||||
esp32:
|
esp32:
|
||||||
@@ -58,15 +85,31 @@ esp32:
|
|||||||
|
|
||||||
##### WIFI SETUP #####
|
##### WIFI SETUP #####
|
||||||
wifi:
|
wifi:
|
||||||
ssid: $wifi_ssid
|
ssid: ${wifi_ssid}
|
||||||
password: $wifi_password
|
password: ${wifi_password}
|
||||||
power_save_mode: none
|
power_save_mode: none
|
||||||
|
manual_ip:
|
||||||
|
static_ip: ${ip}
|
||||||
|
gateway: ${gw}
|
||||||
|
subnet: ${subnet}
|
||||||
|
dns1: ${dns}
|
||||||
|
domain: ${domain}
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "${device_name}"
|
||||||
|
password: !secret esphome_wifi_ap_password
|
||||||
|
|
||||||
captive_portal:
|
captive_portal:
|
||||||
|
|
||||||
|
web_server:
|
||||||
|
port: 80
|
||||||
|
auth:
|
||||||
|
username: admin
|
||||||
|
password: ${webserver_password}
|
||||||
|
|
||||||
##### OTA (Over the air updates) password #####
|
##### OTA (Over the air updates) password #####
|
||||||
ota:
|
ota:
|
||||||
password: $ota_password
|
password: ${ota_password}
|
||||||
safe_mode: true
|
safe_mode: true
|
||||||
reboot_timeout: 3min
|
reboot_timeout: 3min
|
||||||
num_attempts: 3
|
num_attempts: 3
|
||||||
@@ -116,7 +159,7 @@ uart:
|
|||||||
###### A reboot button is always useful #####
|
###### A reboot button is always useful #####
|
||||||
button:
|
button:
|
||||||
- platform: restart
|
- platform: restart
|
||||||
name: $device_name Restart
|
name: ${device_name} Restart
|
||||||
id: restart_nspanel
|
id: restart_nspanel
|
||||||
|
|
||||||
|
|
||||||
@@ -145,19 +188,19 @@ button:
|
|||||||
api:
|
api:
|
||||||
services:
|
services:
|
||||||
|
|
||||||
##### SERVICE TO UPDATE THE HMI FILE #####
|
##### SERVICE TO UPDATE THE HMI FILE #####
|
||||||
- service: upload_tft
|
- service: upload_tft
|
||||||
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. Useful for testing #####
|
||||||
- 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. Useful for testing #####
|
||||||
- service: send_command_text_printf
|
- service: send_command_text_printf
|
||||||
variables:
|
variables:
|
||||||
component: string
|
component: string
|
||||||
@@ -167,7 +210,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. Useful for testing #####
|
||||||
- service: send_command_value
|
- service: send_command_value
|
||||||
variables:
|
variables:
|
||||||
component: string
|
component: string
|
||||||
@@ -177,7 +220,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 "component_value (Dualstate Button)" directly to the display. Useful for testing #####
|
||||||
- service: send_command_hide
|
- service: send_command_hide
|
||||||
variables:
|
variables:
|
||||||
component: string
|
component: string
|
||||||
@@ -186,9 +229,7 @@ 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 "component_value (Dualstate Button)" directly to the display. Useful for testing #####
|
|
||||||
- service: send_command_font_color
|
- service: send_command_font_color
|
||||||
variables:
|
variables:
|
||||||
component: string
|
component: string
|
||||||
@@ -197,7 +238,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 "component_value (Dualstate Button)" directly to the display. Useful for testing #####
|
||||||
- service: send_command_background_color
|
- service: send_command_background_color
|
||||||
variables:
|
variables:
|
||||||
component: string
|
component: string
|
||||||
@@ -229,48 +270,72 @@ api:
|
|||||||
|
|
||||||
globals:
|
globals:
|
||||||
|
|
||||||
##### Save Target Temp #####
|
##### Save Target Temp #####
|
||||||
- id: climate_target_temp_val_global
|
- id: climate_target_temp_val_global
|
||||||
type: float
|
type: float
|
||||||
restore_value: true
|
restore_value: true
|
||||||
initial_value: '12'
|
initial_value: '12'
|
||||||
|
|
||||||
##### Save Thermostat PIC Position #####
|
##### Save Thermostat PIC Position #####
|
||||||
- id: climate_slider_val_global
|
- id: climate_slider_val_global
|
||||||
type: int
|
type: int
|
||||||
restore_value: true
|
restore_value: true
|
||||||
initial_value: '0'
|
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
|
||||||
restore_value: true
|
restore_value: true
|
||||||
initial_value: '100'
|
initial_value: '100'
|
||||||
|
|
||||||
##### Save Display DIM Brightness for NSPanel reboot
|
##### Save Display DIM Brightness for NSPanel reboot
|
||||||
- id: display_dim_brightness_global
|
- id: display_dim_brightness_global
|
||||||
type: int
|
type: int
|
||||||
restore_value: true
|
restore_value: true
|
||||||
initial_value: '10'
|
initial_value: '10'
|
||||||
|
|
||||||
##### Save Display DIM Brightness for NSPanel reboot
|
##### Save Display DIM Brightness for NSPanel reboot
|
||||||
- id: sleep_modus_global
|
- id: sleep_modus_global
|
||||||
type: int
|
type: int
|
||||||
restore_value: true
|
restore_value: true
|
||||||
initial_value: '0'
|
initial_value: '0'
|
||||||
|
|
||||||
##### Save State Heating Room #####
|
##### Save State Heating Room #####
|
||||||
- id: heating_room_global
|
- id: heating_room_global
|
||||||
type: int
|
type: int
|
||||||
restore_value: true
|
restore_value: true
|
||||||
initial_value: '0'
|
initial_value: '0'
|
||||||
|
|
||||||
##### Save State HVAC #####
|
##### Save State HVAC #####
|
||||||
- id: hvac_mode_global
|
- id: hvac_mode_global
|
||||||
type: int
|
type: int
|
||||||
restore_value: true
|
restore_value: true
|
||||||
initial_value: '0'
|
initial_value: '0'
|
||||||
|
|
||||||
|
##### lastclick State #####
|
||||||
|
- id: lastclick_global
|
||||||
|
type: std::string
|
||||||
|
restore_value: no
|
||||||
|
initial_value: ''
|
||||||
|
|
||||||
|
##### lastclick State #####
|
||||||
|
- id: last_click_lightsettings
|
||||||
|
type: std::string
|
||||||
|
restore_value: no
|
||||||
|
initial_value: ''
|
||||||
|
|
||||||
|
##### lastclick State #####
|
||||||
|
- id: last_click_coversettings
|
||||||
|
type: std::string
|
||||||
|
restore_value: no
|
||||||
|
initial_value: ''
|
||||||
|
|
||||||
|
##### lastclick State #####
|
||||||
|
- id: last_click_weathersettings
|
||||||
|
type: std::string
|
||||||
|
restore_value: no
|
||||||
|
initial_value: ''
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@@ -293,32 +358,27 @@ globals:
|
|||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
|
|
||||||
###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY#####
|
###### LEFT BUTTON BELOW DISPLAY TO TOGGLE RELAY#####
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: $device_name Left Button
|
name: ${device_name} Left Button
|
||||||
pin:
|
pin:
|
||||||
number: 14
|
number: 14
|
||||||
inverted: true
|
inverted: true
|
||||||
# on_click:
|
# on_click:
|
||||||
# - switch.toggle: relay_1
|
# - switch.toggle: relay_1
|
||||||
|
|
||||||
##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY #####
|
##### RIGHT BUTTON BELOW DISPLAY TO TOGGLE RELAY #####
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: $device_name Right Button
|
name: ${device_name} Right Button
|
||||||
pin:
|
pin:
|
||||||
number: 27
|
number: 27
|
||||||
inverted: true
|
inverted: true
|
||||||
# on_click:
|
# on_click:
|
||||||
# - switch.toggle: relay_2
|
# - 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
|
||||||
@@ -326,12 +386,12 @@ binary_sensor:
|
|||||||
- 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
|
||||||
@@ -339,12 +399,12 @@ binary_sensor:
|
|||||||
- 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
|
||||||
@@ -352,86 +412,86 @@ binary_sensor:
|
|||||||
on_click:
|
on_click:
|
||||||
- switch.toggle: hvac_mode
|
- switch.toggle: hvac_mode
|
||||||
|
|
||||||
##### Display Brightness - BUTTON DECREASES Brightness #####
|
##### Display Brightness - BUTTON DECREASES Brightness #####
|
||||||
# - platform: nextion
|
# - platform: nextion
|
||||||
# name: $device_name Brightness DOWN
|
# name: $device_name Brightness DOWN
|
||||||
# page_id: 7
|
# page_id: 7
|
||||||
# component_id: 12
|
# component_id: 12
|
||||||
# internal: true
|
# internal: true
|
||||||
# on_click:
|
# on_click:
|
||||||
# - number.set:
|
# - number.set:
|
||||||
# id: display_brightness
|
# id: display_brightness
|
||||||
# value: !lambda return id(display_brightness_global) - 1;
|
# value: !lambda return id(display_brightness_global) - 1;
|
||||||
# - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global));
|
# - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global));
|
||||||
# - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global));
|
# - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global));
|
||||||
|
|
||||||
##### Display Brightness - BUTTON INCREASES Brightness #####
|
##### Display Brightness - BUTTON INCREASES Brightness #####
|
||||||
# - platform: nextion
|
# - platform: nextion
|
||||||
# name: $device_name Brightness UP
|
# name: $device_name Brightness UP
|
||||||
# page_id: 7
|
# page_id: 7
|
||||||
# component_id: 13
|
# component_id: 13
|
||||||
# internal: true
|
# internal: true
|
||||||
# on_click:
|
# on_click:
|
||||||
# - number.set:
|
# - number.set:
|
||||||
# id: display_brightness
|
# id: display_brightness
|
||||||
# value: !lambda return id(display_brightness_global) + 1;
|
# value: !lambda return id(display_brightness_global) + 1;
|
||||||
# - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global));
|
# - lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global));
|
||||||
# - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global));
|
# - lambda: id(disp1).send_command_printf("settings.brightslider.val=%i", id(display_brightness_global));
|
||||||
|
|
||||||
##### Display DIM Brightness - BUTTON DECREASES Brightness #####
|
##### Display DIM Brightness - BUTTON DECREASES Brightness #####
|
||||||
# - platform: nextion
|
# - platform: nextion
|
||||||
# name: $device_name Brightness DIM DOWN
|
# name: $device_name Brightness DIM DOWN
|
||||||
# page_id: 7
|
# page_id: 7
|
||||||
# component_id: 14
|
# component_id: 14
|
||||||
# internal: true
|
# internal: true
|
||||||
# on_click:
|
# on_click:
|
||||||
# - number.set:
|
# - number.set:
|
||||||
# id: display_dim_brightness
|
# id: display_dim_brightness
|
||||||
# value: !lambda return id(display_dim_brightness_global) - 1;
|
# value: !lambda return id(display_dim_brightness_global) - 1;
|
||||||
# - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
|
# - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
|
||||||
# - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
|
# - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
|
||||||
|
|
||||||
##### Display DIM Brightness - BUTTON INCREASES Brightness #####
|
##### Display DIM Brightness - BUTTON INCREASES Brightness #####
|
||||||
# - platform: nextion
|
# - platform: nextion
|
||||||
# name: $device_name Brightness DIM UP
|
# name: $device_name Brightness DIM UP
|
||||||
# page_id: 7
|
# page_id: 7
|
||||||
# component_id: 15
|
# component_id: 15
|
||||||
# internal: true
|
# internal: true
|
||||||
# on_click:
|
# on_click:
|
||||||
# - number.set:
|
# - number.set:
|
||||||
# id: display_dim_brightness
|
# id: display_dim_brightness
|
||||||
# value: !lambda return id(display_dim_brightness_global) + 1;
|
# value: !lambda return id(display_dim_brightness_global) + 1;
|
||||||
# - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
|
# - lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
|
||||||
# - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
|
# - lambda: id(disp1).send_command_printf("settings.dimslider.val=%i", id(display_dim_brightness_global));
|
||||||
|
|
||||||
##### Restart NSPanel Button #####
|
##### Restart NSPanel Button #####
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
name: $device_name Restart
|
name: ${device_name} Restart
|
||||||
page_id: 7
|
page_id: 7
|
||||||
component_id: 10
|
component_id: 10
|
||||||
internal: true
|
internal: true
|
||||||
on_click:
|
on_click:
|
||||||
- button.press: restart_nspanel
|
- button.press: restart_nspanel
|
||||||
|
|
||||||
##### Sleep Modus NSPanel Button #####
|
##### Sleep Modus NSPanel Button #####
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
name: $device_name Sleep Modus
|
name: ${device_name} Sleep Modus
|
||||||
page_id: 7
|
page_id: 7
|
||||||
component_id: 5
|
component_id: 5
|
||||||
internal: true
|
internal: true
|
||||||
on_click:
|
on_click:
|
||||||
- switch.toggle: sleep_modus
|
- switch.toggle: sleep_modus
|
||||||
|
|
||||||
##### Hotwater Charge #####
|
##### Hotwater Charge #####
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
name: $device_name Hotwater Charge
|
name: ${device_name} Hotwater Charge
|
||||||
page_id: 6
|
page_id: 6
|
||||||
component_id: 21
|
component_id: 21
|
||||||
on_click:
|
on_click:
|
||||||
- homeassistant.service:
|
- homeassistant.service:
|
||||||
service: switch.toggle
|
service: switch.toggle
|
||||||
data:
|
data:
|
||||||
entity_id: $ha_hotwater_charge
|
entity_id: ${ha_hotwater_charge}
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
#
|
#
|
||||||
@@ -455,23 +515,33 @@ binary_sensor:
|
|||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
|
|
||||||
##### INTERNAL TEMPERATUE SENSOR, ADC VALUE #####
|
##### Uptime #####
|
||||||
|
- platform: uptime
|
||||||
|
name: ${device_name} uptime
|
||||||
|
disabled_by_default: true
|
||||||
|
|
||||||
|
##### WIFI Signal stregth
|
||||||
|
- platform: wifi_signal
|
||||||
|
name: ${device_name} RSSI
|
||||||
|
update_interval: 60s
|
||||||
|
|
||||||
|
##### INTERNAL TEMPERATUE SENSOR, ADC VALUE #####
|
||||||
- platform: adc
|
- platform: adc
|
||||||
id: ntc_source
|
id: ntc_source
|
||||||
pin: 38
|
pin: 38
|
||||||
update_interval: 10s
|
update_interval: 10s
|
||||||
attenuation: 11db
|
attenuation: 11db
|
||||||
|
|
||||||
##### INTERNAL TEMPERATUE SENSOR, adc reading converted to resistance (calculation)#####
|
##### INTERNAL TEMPERATUE SENSOR, adc reading converted to resistance (calculation)#####
|
||||||
- platform: resistance
|
- platform: resistance
|
||||||
id: resistance_sensor
|
id: resistance_sensor
|
||||||
sensor: ntc_source
|
sensor: ntc_source
|
||||||
configuration: DOWNSTREAM
|
configuration: DOWNSTREAM
|
||||||
resistor: 11.2kOhm
|
resistor: 11.2kOhm
|
||||||
|
|
||||||
##### INTERNAL TEMPERATUE SENSOR, resistance to temperature (calculation) #####
|
##### INTERNAL TEMPERATUE SENSOR, resistance to temperature (calculation) #####
|
||||||
- platform: ntc
|
- platform: ntc
|
||||||
name: $device_name Temperature
|
name: ${device_name} Temperature
|
||||||
id: temp_nspanel
|
id: temp_nspanel
|
||||||
sensor: resistance_sensor
|
sensor: resistance_sensor
|
||||||
calibration:
|
calibration:
|
||||||
@@ -485,43 +555,43 @@ sensor:
|
|||||||
- lambda: id(disp1).set_component_text_printf("home.a03", "%.1f°", id(temp_nspanel).state); # onboard temp (thermostat temp) to home page.
|
- lambda: id(disp1).set_component_text_printf("home.a03", "%.1f°", id(temp_nspanel).state); # onboard temp (thermostat temp) to home page.
|
||||||
- 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);
|
||||||
|
|
||||||
##### TEMPERATURE Outdoor FROM HA #####
|
##### TEMPERATURE Outdoor FROM HA #####
|
||||||
# - platform: homeassistant
|
# - platform: homeassistant
|
||||||
# id: temp_outdoor
|
# id: temp_outdoor
|
||||||
# entity_id: $ha_outdoor_temp
|
# entity_id: $ha_outdoor_temp
|
||||||
# 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.a06", "%.0f°", id(temp_outdoor).state);
|
# - lambda: id(disp1).set_component_text_printf("home.a06", "%.0f°", id(temp_outdoor).state);
|
||||||
# - lambda: id(disp1).set_component_text_printf("thermostat.a07", "%.0f°", id(temp_outdoor).state);
|
# - lambda: id(disp1).set_component_text_printf("thermostat.a07", "%.0f°", id(temp_outdoor).state);
|
||||||
|
|
||||||
##### HUMIDITY Indoor FROM HA #####
|
##### HUMIDITY Indoor FROM HA #####
|
||||||
# - platform: homeassistant
|
# - platform: homeassistant
|
||||||
# id: humidity
|
# id: humidity
|
||||||
# entity_id: $ha_humidity
|
# entity_id: $ha_humidity
|
||||||
# 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.a04", "%.0f°", id(humidity).state);
|
# - lambda: id(disp1).set_component_text_printf("home.a04", "%.0f°", id(humidity).state);
|
||||||
|
|
||||||
|
|
||||||
##### THERMOSTAT HOT WATER TEMP FROM HA #####
|
##### THERMOSTAT HOT WATER TEMP FROM HA #####
|
||||||
# - platform: homeassistant
|
# - platform: homeassistant
|
||||||
# id: temp_hotwater
|
# id: temp_hotwater
|
||||||
# entity_id: $ha_hotwater_temp
|
# entity_id: $ha_hotwater_temp
|
||||||
# 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.a07", "%.1f°", id(temp_hotwater).state);
|
# - lambda: id(disp1).set_component_text_printf("home.a07", "%.1f°", id(temp_hotwater).state);
|
||||||
# - lambda: id(disp1).set_component_text_printf("thermostat.a08", "%.1f°", id(temp_hotwater).state);
|
# - lambda: id(disp1).set_component_text_printf("thermostat.a08", "%.1f°", id(temp_hotwater).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:
|
||||||
@@ -657,10 +727,10 @@ sensor:
|
|||||||
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:
|
||||||
@@ -733,13 +803,13 @@ sensor:
|
|||||||
- 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
|
||||||
id: brightslider
|
id: brightslider
|
||||||
name: $device_name brightness Slider
|
name: ${device_name} brightness Slider
|
||||||
variable_name: brightslider
|
variable_name: brightslider
|
||||||
internal: true
|
internal: true
|
||||||
on_value:
|
on_value:
|
||||||
@@ -752,10 +822,10 @@ sensor:
|
|||||||
# send text field percentage of current_lightslider_val
|
# send text field percentage of current_lightslider_val
|
||||||
- lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global));
|
- lambda: id(disp1).set_component_text_printf("settings.a03", "%i", id(display_brightness_global));
|
||||||
|
|
||||||
###### Display DIM Brightness GET VALUE FROM NSPanel SLIDER #####
|
###### Display DIM Brightness GET VALUE FROM NSPanel SLIDER #####
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
id: dimslider
|
id: dimslider
|
||||||
name: $device_name dim brightness slider
|
name: ${device_name} dim brightness slider
|
||||||
variable_name: dimslider
|
variable_name: dimslider
|
||||||
internal: true
|
internal: true
|
||||||
on_value:
|
on_value:
|
||||||
@@ -768,6 +838,17 @@ sensor:
|
|||||||
# send text field percentage of current_lightslider_val
|
# send text field percentage of current_lightslider_val
|
||||||
- lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
|
- lambda: id(disp1).set_component_text_printf("settings.a04", "%i", id(display_dim_brightness_global));
|
||||||
|
|
||||||
|
###### Send current page to HA
|
||||||
|
- platform: nextion
|
||||||
|
id: current_page
|
||||||
|
name: "${device_name} Current Page"
|
||||||
|
variable_name: dp
|
||||||
|
update_interval: 1s
|
||||||
|
accuracy_decimals: 0
|
||||||
|
filters:
|
||||||
|
- delta: 1.0
|
||||||
|
- lambda: return int(x);
|
||||||
|
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
#
|
#
|
||||||
@@ -791,62 +872,126 @@ sensor:
|
|||||||
|
|
||||||
text_sensor:
|
text_sensor:
|
||||||
|
|
||||||
##### ESPhome version used to compile the app #####
|
##### ESPhome version used to compile the app #####
|
||||||
- platform: version
|
- platform: version
|
||||||
name: $device_name ESPhome Version
|
name: ${device_name} ESPhome Version
|
||||||
|
disabled_by_default: true
|
||||||
|
|
||||||
##### SUN SENSOR FROM HA #####
|
- platform: wifi_info
|
||||||
|
ip_address:
|
||||||
|
name: ${device_name} IP
|
||||||
|
disabled_by_default: true
|
||||||
|
ssid:
|
||||||
|
name: ${device_name} SSID
|
||||||
|
disabled_by_default: true
|
||||||
|
bssid:
|
||||||
|
name: ${device_name} BSSID
|
||||||
|
disabled_by_default: true
|
||||||
|
|
||||||
|
##### 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
|
||||||
nextion_id: disp1
|
nextion_id: disp1
|
||||||
name: $device_name last click
|
name: ${device_name} Last Click
|
||||||
id: disp1_last_click_va
|
id: disp1_last_click_nextion
|
||||||
update_interval: 50ms
|
update_interval: 50ms
|
||||||
component_name: lastclick
|
component_name: lastclick
|
||||||
|
internal: false
|
||||||
|
filters:
|
||||||
|
- lambda: |-
|
||||||
|
if (strcmp(x.c_str(), id(lastclick_global).c_str()) != 0) {
|
||||||
|
return x;
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- globals.set:
|
||||||
|
id: lastclick_global
|
||||||
|
value: !lambda return x;
|
||||||
|
|
||||||
##### last click lightsettings page, the main action variable - push to HA #####
|
##### last click lightsettings page, the main action variable - push to HA #####
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
nextion_id: disp1
|
nextion_id: disp1
|
||||||
name: $device_name last click lightsettings
|
name: ${device_name} last click lightsettings
|
||||||
id: disp1_last_click_lightsettings
|
id: disp1_last_click_lightsettings
|
||||||
update_interval: 50ms
|
update_interval: 50ms
|
||||||
component_name: lightsetting
|
component_name: lightsetting
|
||||||
|
internal: false
|
||||||
|
filters:
|
||||||
|
- lambda: |-
|
||||||
|
if (strcmp(x.c_str(), id(last_click_lightsettings).c_str()) != 0) {
|
||||||
|
return x;
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- globals.set:
|
||||||
|
id: last_click_lightsettings
|
||||||
|
value: !lambda return x;
|
||||||
|
|
||||||
##### last click coversettings page, the main action variable - push to HA #####
|
##### last click coversettings page, the main action variable - push to HA #####
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
nextion_id: disp1
|
nextion_id: disp1
|
||||||
name: $device_name last click coversettings
|
name: ${device_name} last click coversettings
|
||||||
id: disp1_last_click_coversettings
|
id: disp1_last_click_coversettings
|
||||||
update_interval: 50ms
|
update_interval: 50ms
|
||||||
component_name: coversetting
|
component_name: coversetting
|
||||||
|
internal: false
|
||||||
|
filters:
|
||||||
|
- lambda: |-
|
||||||
|
if (strcmp(x.c_str(), id(last_click_coversettings).c_str()) != 0) {
|
||||||
|
return x;
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- globals.set:
|
||||||
|
id: last_click_coversettings
|
||||||
|
value: !lambda return x;
|
||||||
|
|
||||||
##### last click weather page, the main action variable - push to HA #####
|
##### last click weather page, the main action variable - push to HA #####
|
||||||
- platform: nextion
|
- platform: nextion
|
||||||
nextion_id: disp1
|
nextion_id: disp1
|
||||||
name: $device_name last click weathersettings
|
name: ${device_name} last click weathersettings
|
||||||
id: disp1_last_click_weathersettings
|
id: disp1_last_click_weathersettings
|
||||||
update_interval: 50ms
|
update_interval: 50ms
|
||||||
component_name: weathersetting
|
component_name: weathersetting
|
||||||
|
internal: false
|
||||||
|
filters:
|
||||||
|
- lambda: |-
|
||||||
|
if (strcmp(x.c_str(), id(last_click_weathersettings).c_str()) != 0) {
|
||||||
|
return x;
|
||||||
|
} else {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
on_value:
|
||||||
|
then:
|
||||||
|
- globals.set:
|
||||||
|
id: last_click_weathersettings
|
||||||
|
value: !lambda return x;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### Wochentag SENSOR FROM HA #####
|
##### Wochentag SENSOR FROM HA #####
|
||||||
# - platform: homeassistant
|
# - platform: homeassistant
|
||||||
# id: weekday
|
# id: weekday
|
||||||
# entity_id: $ha_weekday
|
# entity_id: $ha_weekday
|
||||||
# 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.a02", "%s", id(weekday).state.c_str());
|
# - lambda: id(disp1).set_component_text_printf("home.a02", "%s", id(weekday).state.c_str());
|
||||||
|
|
||||||
##### 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:
|
||||||
@@ -861,9 +1006,9 @@ text_sensor:
|
|||||||
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:
|
||||||
@@ -951,16 +1096,24 @@ text_sensor:
|
|||||||
|
|
||||||
switch:
|
switch:
|
||||||
|
|
||||||
##### global variable to keep track on whether the Nextion display is ready or not. Delays initial info from HA to the display #####
|
# ##### Restart switch ######
|
||||||
|
# - platform: restart
|
||||||
|
# name: ${device_name} Restart
|
||||||
|
|
||||||
|
# ##### Restart in safe-mode #####
|
||||||
|
# - platform: safe_mode
|
||||||
|
# name: ${device_name} Restart (Safe Mode)
|
||||||
|
|
||||||
|
##### global variable to keep track on whether the Nextion display is ready or not. Delays initial info from HA to the display #####
|
||||||
- platform: template
|
- platform: template
|
||||||
name: $device_name Nextion inited
|
name: ${device_name} Nextion inited
|
||||||
id: nextion_init
|
id: nextion_init
|
||||||
entity_category: config
|
entity_category: config
|
||||||
restore_state: false
|
restore_state: false
|
||||||
assumed_state: off
|
assumed_state: off
|
||||||
optimistic: true
|
optimistic: true
|
||||||
|
|
||||||
##### UPDATE TFT DISPLAY #####
|
##### UPDATE TFT DISPLAY #####
|
||||||
- platform: template
|
- platform: template
|
||||||
name: Update TFT display
|
name: Update TFT display
|
||||||
id: tft_update
|
id: tft_update
|
||||||
@@ -969,44 +1122,44 @@ switch:
|
|||||||
- lambda: id(disp1).upload_tft();
|
- lambda: id(disp1).upload_tft();
|
||||||
- switch.turn_off: tft_update
|
- switch.turn_off: tft_update
|
||||||
|
|
||||||
##### PHYSICAL SWITCH 1 #####
|
##### PHYSICAL SWITCH 1 #####
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: $device_name Relay 1
|
name: ${device_name} Relay 1
|
||||||
id: relay_1
|
id: relay_1
|
||||||
pin:
|
pin:
|
||||||
number: 22
|
number: 22
|
||||||
|
|
||||||
##### PHYSICAL SWITCH 2 ######
|
##### PHYSICAL SWITCH 2 ######
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: $device_name Relay 2
|
name: ${device_name} Relay 2
|
||||||
id: relay_2
|
id: relay_2
|
||||||
pin:
|
pin:
|
||||||
number: 19
|
number: 19
|
||||||
on_turn_off:
|
# on_turn_off:
|
||||||
- globals.set:
|
# - globals.set:
|
||||||
id: heating_room_global
|
# id: heating_room_global
|
||||||
value: '0'
|
# value: '0'
|
||||||
- lambda: |-
|
# - lambda: |-
|
||||||
if (id(hvac_mode_global) == 0)
|
# if (id(hvac_mode_global) == 0)
|
||||||
{
|
# {
|
||||||
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("thermostat.a06.pic=50");
|
# id(disp1).send_command_printf("thermostat.a06.pic=50");
|
||||||
}
|
# }
|
||||||
- lambda: id(disp1).send_command_printf("home.a52.pic=53");
|
# - lambda: id(disp1).send_command_printf("home.a52.pic=53");
|
||||||
- lambda: id(disp1).send_command_printf("thermostat.a52.pic=53");
|
# - lambda: id(disp1).send_command_printf("thermostat.a52.pic=53");
|
||||||
on_turn_on:
|
# on_turn_on:
|
||||||
- globals.set:
|
# - globals.set:
|
||||||
id: heating_room_global
|
# id: heating_room_global
|
||||||
value: '1'
|
# value: '1'
|
||||||
- lambda: id(disp1).send_command_printf("thermostat.a06.pic=51");
|
# - lambda: id(disp1).send_command_printf("thermostat.a06.pic=51");
|
||||||
- lambda: id(disp1).send_command_printf("home.a52.pic=66");
|
# - lambda: id(disp1).send_command_printf("home.a52.pic=66");
|
||||||
- lambda: id(disp1).send_command_printf("thermostat.a52.pic=66");
|
# - lambda: id(disp1).send_command_printf("thermostat.a52.pic=66");
|
||||||
|
|
||||||
##### 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
|
||||||
@@ -1044,9 +1197,9 @@ switch:
|
|||||||
- 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
|
||||||
name: $device_name Screen Power
|
name: ${device_name} Screen Power
|
||||||
id: screen_power
|
id: screen_power
|
||||||
entity_category: config
|
entity_category: config
|
||||||
pin:
|
pin:
|
||||||
@@ -1055,10 +1208,10 @@ switch:
|
|||||||
restore_mode: ALWAYS_ON
|
restore_mode: ALWAYS_ON
|
||||||
internal: true
|
internal: true
|
||||||
|
|
||||||
##### Switch Display Sleep Modus #####
|
##### Switch Display Sleep Modus #####
|
||||||
- platform: template
|
- platform: template
|
||||||
device_class: switch
|
device_class: switch
|
||||||
name: $device_name Sleep Modus
|
name: ${device_name} Sleep Modus
|
||||||
id: sleep_modus
|
id: sleep_modus
|
||||||
restore_state: true
|
restore_state: true
|
||||||
assumed_state: false
|
assumed_state: false
|
||||||
@@ -1098,9 +1251,9 @@ switch:
|
|||||||
|
|
||||||
number:
|
number:
|
||||||
|
|
||||||
##### SCREEN BRIGHTNESS #####
|
##### SCREEN BRIGHTNESS #####
|
||||||
- platform: template
|
- platform: template
|
||||||
name: $device_name Display Brightness
|
name: ${device_name} Display Brightness
|
||||||
id: display_brightness
|
id: display_brightness
|
||||||
entity_category: config
|
entity_category: config
|
||||||
unit_of_measurement: '%'
|
unit_of_measurement: '%'
|
||||||
@@ -1117,9 +1270,9 @@ number:
|
|||||||
id: display_brightness_global
|
id: display_brightness_global
|
||||||
value: !lambda 'return int(x);'
|
value: !lambda 'return int(x);'
|
||||||
|
|
||||||
##### SCREEN BRIGHTNESS DIMMED DOWN #####
|
##### SCREEN BRIGHTNESS DIMMED DOWN #####
|
||||||
- platform: template
|
- platform: template
|
||||||
name: $device_name Display Brightness Dimdown
|
name: ${device_name} Display Brightness Dimdown
|
||||||
id: display_dim_brightness
|
id: display_dim_brightness
|
||||||
entity_category: config
|
entity_category: config
|
||||||
unit_of_measurement: '%'
|
unit_of_measurement: '%'
|
||||||
@@ -1159,7 +1312,7 @@ display:
|
|||||||
- platform: nextion
|
- platform: nextion
|
||||||
id: disp1
|
id: disp1
|
||||||
uart_id: tf_uart
|
uart_id: tf_uart
|
||||||
tft_url: $nextion_update_url
|
tft_url: ${nextion_update_url}
|
||||||
on_setup:
|
on_setup:
|
||||||
then:
|
then:
|
||||||
- lambda: id(disp1).send_command_printf("page 9"); ##### CHANGE! - Loading page #####
|
- lambda: id(disp1).send_command_printf("page 9"); ##### CHANGE! - Loading page #####
|
||||||
|
|||||||
Reference in New Issue
Block a user