Edit esp-bedside-panel.yaml

This commit is contained in:
ESPHome Device Builder
2026-07-28 17:27:36 +12:00
parent a000ee1b11
commit b268b3cbf9
+44 -3
View File
@@ -6,6 +6,7 @@
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-bedside-panel.yaml
#:########################################################################################:#
# VERSIONS:
# V1.48 2026-07-28 Added raw onboard battery ADC voltage monitoring on GPIO53 for divider calibration
# V1.47 2026-07-20 Widened the alarm volume range while retaining 5-100% controls and the proven 6000 Hz tone
# V1.46 2026-07-20 Raised the alarm tone to 6000 Hz, limited volume to 5-100%, and remapped 100% to the previous displayed 30% level
# V1.45 2026-07-20 Shortened the project description to remain within ESPHome's 255-byte string limit
@@ -107,6 +108,7 @@
# - Battery-backed RTC: RX8130
# - RTC I2C address: 0x32
# - TEMT6000 ambient-light sensor signal: GPIO20 / ADC1
# - Battery voltage sense test input: GPIO53 / ADC2
# - ES8311 audio codec: I2C address 0x18
# - Audio I2S: MCLK GPIO13, BCLK GPIO12, LRCLK GPIO10, DOUT GPIO9
# - Speaker amplifier enable: GPIO11 (active high on this board revision)
@@ -156,6 +158,8 @@
# - Beep is a short 6000 Hz electronic tone.
# - Alarm repeats a quick 6000 Hz beep-beep-beep group followed by a pause.
# - Speaker tests generate audio locally and do not require Home Assistant or media files.
# - Raw battery-sense ADC voltage is exposed from GPIO53 for calibration.
# - No battery divider multiplier or percentage estimate is applied in this test version.
#:########################################################################################:#
# OFFLINE NOTES:
# - LVGL, the clock, touch and backlight operate locally.
@@ -174,12 +178,12 @@ substitutions:
# Device Naming
device_name: "esp-bedside-panel"
friendly_name: "ESP Bedside Panel"
description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 bedside panel with four alarms, 6000 Hz triplet sound, wide 5-100% volume range and 24-hour time editor. (Layout V1.1)"
description_comment: "Guition JC1060P470C_I_W_Y ESP32-P4 bedside panel with four alarms, local speaker tests, battery ADC monitoring and a 24-hour time editor. (Layout V1.1)"
device_area: "Bedroom"
# Project Naming
project_name: "Guition.JC1060P470C_I_W_Y"
project_version: "v1.47"
project_version: "v1.48"
# Passwords & Secrets
api_key: !secret esp-api_key
@@ -199,6 +203,12 @@ substitutions:
ambient_light_pin: "GPIO20"
ambient_light_update_interval: "1s"
# Battery Voltage Test Settings
# GPIO53 is connected to the board battery-sense circuit. The raw ADC
# voltage is published first so the onboard divider can be calibrated.
battery_voltage_pin: "GPIO53"
battery_voltage_update_interval: "5s"
# Touchscreen Settings
touch_sda_pin: "GPIO7"
touch_scl_pin: "GPIO8"
@@ -1097,6 +1107,37 @@ sensor:
id: wifi_signal_sensor
update_interval: "${update_interval}"
#:######################################################################################:#
# INTERNAL BATTERY ADC VOLTAGE #
#:######################################################################################:#
#
# GPIO53 is connected to the JC1060P470 battery-sense circuit.
#
# This sensor intentionally reports the raw voltage present at the ADC pin.
# Do not treat it as the actual 18650 voltage until it has been compared with
# a multimeter and the board's voltage-divider ratio has been established.
#
# The ADC samples every five seconds. A rolling median is published every
# third sample, giving a new filtered value approximately every 15 seconds.
- platform: adc
id: battery_adc_voltage
name: "${friendly_name} Battery ADC Voltage"
pin: "${battery_voltage_pin}"
attenuation: auto
update_interval: "${battery_voltage_update_interval}"
accuracy_decimals: 3
device_class: voltage
state_class: measurement
unit_of_measurement: "V"
icon: mdi:battery
entity_category: diagnostic
filters:
- median:
window_size: 5
send_every: 3
send_first_at: 1
#:######################################################################################:#
# TEMT6000 AMBIENT LIGHT SENSOR
#:######################################################################################:#
@@ -11861,4 +11902,4 @@ lvgl:
text: ""
text_font: font_small
text_color: 0x887799
clickable: false
clickable: false