Files
NSPanel_HA_Blueprint/esphome/nspanel_esphome_advanced.yaml
Edward Firmo ae05f133e1 Move webserver to core package
This is reverting back from cJson to ArduinoJson as that was adding to memory consumption when webserver was used (quite common), reducing the benefits of a lighter library.
2024-03-29 21:42:26 +01:00

103 lines
2.8 KiB
YAML

#####################################################################################################
##### NSPANEL ESPHOME created by Blackymas - https://github.com/Blackymas/NSPanel_HA_Blueprint #####
##### ESPHOME ADVANCED #####
##### 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. #####
#####################################################################################################
##### ATTENTION: This will add advanced elements to the core system and requires the core part. #####
#####################################################################################################
---
substitutions:
##############################
## Change only in your ##
## local yaml substitutions ##
ap_password: ${wifi_password}
##############################
button:
- name: Exit reparse
platform: template
icon: mdi:file-sync
id: tft_reparse_off
entity_category: config
internal: false
disabled_by_default: true
on_press:
- logger.log: "Button pressed: Exit reparse"
- script.execute: exit_reparse
captive_portal:
script:
- id: exit_reparse
mode: restart
then:
- logger.log: "Exit reparse"
- uart.write: "DRAKJHSUYDGBNCJHGJKSHBDN"
- uart.write: [0xFF, 0xFF, 0xFF]
- id: !extend stop_all
then:
- lambda: |-
exit_reparse->stop();
sensor:
##### Uptime Sensors #####
- name: Uptime seconds
id: uptime_sec
platform: uptime
internal: true
- name: API uptime
id: api_timestamp
platform: template
lambda: 'return id(time_provider).now().timestamp;'
internal: false
device_class: timestamp
entity_category: diagnostic
accuracy_decimals: 0
update_interval: never
- name: Device uptime
id: device_timestamp
platform: template
lambda: 'return (id(time_provider).now().timestamp - id(uptime_sec).state);'
internal: false
device_class: timestamp
entity_category: diagnostic
accuracy_decimals: 0
update_interval: never
text_sensor:
##### ESPhome version used to compile the app #####
- name: ESPhome Version
platform: version
disabled_by_default: false
internal: false
icon: mdi:tag-text-outline
- platform: wifi_info
ip_address:
name: IP
disabled_by_default: true
id: ip_address
ssid:
name: SSID
disabled_by_default: true
bssid:
name: BSSID
disabled_by_default: true
time:
- id: !extend time_provider
on_time_sync:
then:
- component.update: api_timestamp
- component.update: device_timestamp
wifi:
ap:
ssid: "${name}"
password: ${ap_password}
...