Files
NSPanel_HA_Blueprint/nspanel_esphome_advanced.yaml
Edward Firmo 303f5361ec Move non critical components to nspanel_esphome_advanced
To free up some memory on ESPHome.
2023-10-04 10:15:46 +02:00

98 lines
3.0 KiB
YAML

#####################################################################################################
##### 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. #####
#####################################################################################################
##### ATTENTION: This will add advanced elements to the core system and requires the core part. #####
#####################################################################################################
captive_portal:
time:
- id: !extend time_provider
on_time_sync:
then:
- component.update: api_timestamp
- component.update: device_timestamp
button:
##### EXIT REPARSE TFT DISPLAY #####
- name: ${device_name} Exit reparse
platform: template
icon: mdi:file-sync
id: tft_reparse_off
entity_category: config
on_press:
- logger.log: "Button pressed: Exit reparse"
- uart.write:
id: tf_uart
data: "DRAKJHSUYDGBNCJHGJKSHBDN"
- uart.write:
id: tf_uart
data: [0xFF, 0xFF, 0xFF]
api:
services:
##### Service to play a rtttl tones #####
# Example tones : https://codebender.cc/sketch:109888#RTTTL%20Songs.ino
- service: play_rtttl
variables:
song_str: string
then:
- rtttl.play:
rtttl: !lambda 'return song_str;'
sensor:
##### Uptime Sensors #####
- name: ${device_name} Uptime seconds
id: uptime_sec
platform: uptime
internal: true
- name: ${device_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_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
##### WIFI Signal stregth
- name: ${device_name} RSSI
platform: wifi_signal
update_interval: 60s
on_value:
- script.execute:
id: refresh_wifi_icon
text_sensor:
##### ESPhome version used to compile the app #####
- name: ${device_name} ESPhome Version
platform: version
disabled_by_default: true
- platform: wifi_info
ip_address:
name: ${device_name} IP
disabled_by_default: true
id: ip_address
ssid:
name: ${device_name} SSID
disabled_by_default: true
bssid:
name: ${device_name} BSSID
disabled_by_default: true