2020-11-19 22:41:08 +00:00
|
|
|
|
substitutions:
|
|
|
|
|
platform: ESP32
|
|
|
|
|
board: esp32dev
|
|
|
|
|
log_level: none
|
|
|
|
|
wifi_ssid: !secret wifi_ssid
|
|
|
|
|
wifi_password: !secret wifi_password
|
|
|
|
|
|
|
|
|
|
esphome:
|
|
|
|
|
name: ${device_id}
|
|
|
|
|
platform: ${platform}
|
|
|
|
|
board: ${board}
|
|
|
|
|
arduino_version: latest
|
|
|
|
|
build_path: ../build/${device_id}
|
|
|
|
|
includes:
|
|
|
|
|
- ../custom/scripture_of_the_day.h
|
|
|
|
|
|
2021-06-15 22:23:38 +00:00
|
|
|
|
packages:
|
|
|
|
|
wifi: !include wifi/wifi_dhcp.yaml
|
|
|
|
|
logger: !include logger/logger.yaml
|
2020-11-19 22:41:08 +00:00
|
|
|
|
|
|
|
|
|
custom_component:
|
|
|
|
|
- lambda: |-
|
|
|
|
|
Scripture = new ScriptureOfTheDay();
|
|
|
|
|
Scripture->set_http_request(http_cmp);
|
|
|
|
|
Scripture->set_display(the_display);
|
|
|
|
|
Scripture->set_deep_sleep(deep_sleep_cmp);
|
|
|
|
|
Scripture->set_sntp(sntp_cmp);
|
|
|
|
|
Scripture->set_fonts(verse_font, reference_font);
|
|
|
|
|
return {Scripture};
|
|
|
|
|
|
2020-12-12 02:29:56 +00:00
|
|
|
|
# Setting run duration to 30s, if we aren't done by then something went wrong so we shutdown to save battery
|
|
|
|
|
# Setting a default sleep time of 15min that will only apply if we forced a shutdown after the 30s run duration
|
2020-11-19 22:41:08 +00:00
|
|
|
|
deep_sleep:
|
|
|
|
|
id: deep_sleep_cmp
|
2020-12-12 02:29:56 +00:00
|
|
|
|
run_duration: 30s
|
2020-11-19 22:41:08 +00:00
|
|
|
|
sleep_duration: 15min
|
|
|
|
|
|
|
|
|
|
display:
|
|
|
|
|
- platform: waveshare_epaper
|
|
|
|
|
id: the_display
|
|
|
|
|
cs_pin: 15
|
|
|
|
|
dc_pin: 27
|
|
|
|
|
busy_pin: 25
|
|
|
|
|
reset_pin: 26
|
|
|
|
|
update_interval: 600s
|
|
|
|
|
model: 7.50inV2
|
|
|
|
|
lambda: |-
|
|
|
|
|
Scripture->display_scripture();
|
|
|
|
|
|
|
|
|
|
font:
|
|
|
|
|
- file: "c:/windows/fonts/segoeprb.ttf"
|
|
|
|
|
id: verse_font
|
|
|
|
|
size: 35
|
|
|
|
|
glyphs: "~!&-;:\"',.?’—“”0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz"
|
|
|
|
|
- file: "c:/windows/fonts/segoeprb.ttf"
|
|
|
|
|
id: reference_font
|
|
|
|
|
size: 30
|
|
|
|
|
glyphs: "-:0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz"
|
|
|
|
|
|
|
|
|
|
http_request:
|
|
|
|
|
id: http_cmp
|
|
|
|
|
|
|
|
|
|
spi:
|
|
|
|
|
clk_pin: 13
|
|
|
|
|
mosi_pin: 14
|
|
|
|
|
|
|
|
|
|
time:
|
|
|
|
|
- platform: sntp
|
|
|
|
|
id: sntp_cmp
|
|
|
|
|
timezone: America/Chicago
|