ESPHome-Devices/packages/scripture_of_the_day.yaml

70 lines
1.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
packages:
wifi: !include wifi/wifi_dhcp.yaml
logger: !include logger/logger.yaml
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};
# 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
deep_sleep:
id: deep_sleep_cmp
run_duration: 30s
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