Hi!
I’ve been playing with this for quite a while, and am very pleased that it’s working. A number of the problems I solved here seem a bit unusual; hopefully this helps some future folks.
I wrote up a full version here: Building an e-Ink ToDo list | praccu’s blog
Hardware
Name | Price |
---|---|
WaveShare 7.5 inch screen | $69.99 |
WaveShare ESP32 Driver Board | $14.99 |
WaveShare Driver HAT | $9.99 |
AdaFruit USB Battery Pack - 10000mAh | $39.95 |
Tindie Power Bank Keep Alive | $13.50 |
HomeAssistant base station (consider ODroid) | |
A frame that can display 6.5" x 3.9" |
Home Assistant config
sensor:
- platform: command_line
name: todo_list
scan_interval: 30
command: >
echo "{\"tasks\":" $(
curl -X GET https://api.todoist.com/rest/v2/tasks -H 'Authorization: Bearer REDACTED'
) "}"
value_template: >
{{ value_json.tasks | length }}
json_attributes:
- tasks
unique_id: 'todoist_tasks'
- platform: template
sensors:
item0:
value_template: "{% if states.sensor.todo_list_2.state | int > 0 %} {{states.sensor.todo_list_2.attributes.tasks[0].content }} {% else %} {% endif %}"
item1:
value_template: "{% if states.sensor.todo_list_2.state | int > 1 %} {{states.sensor.todo_list_2.attributes.tasks[1].content }} {% else %} {% endif %}"
item2:
value_template: "{% if states.sensor.todo_list_2.state | int > 2 %} {{states.sensor.todo_list_2.attributes.tasks[2].content }} {% else %} {% endif %}"
item3:
value_template: "{% if states.sensor.todo_list_2.state | int > 3 %} {{states.sensor.todo_list_2.attributes.tasks[3].content }} {% else %} {% endif %}"
item4:
value_template: "{% if states.sensor.todo_list_2.state | int > 4 %} {{states.sensor.todo_list_2.attributes.tasks[4].content }} {% else %} {% endif %}"
item5:
value_template: "{% if states.sensor.todo_list_2.state | int > 5 %} {{states.sensor.todo_list_2.attributes.tasks[5].content }} {% else %} {% endif %}"
item6:
value_template: "{% if states.sensor.todo_list_2.state | int > 6 %} {{states.sensor.todo_list_2.attributes.tasks[6].content }} {% else %} {% endif %}"
item7:
value_template: "{% if states.sensor.todo_list_2.state | int > 7 %} {{states.sensor.todo_list_2.attributes.tasks[7].content }} {% else %} {% endif %}"
item8:
value_template: "{% if states.sensor.todo_list_2.state | int > 8 %} {{states.sensor.todo_list_2.attributes.tasks[8].content }} {% else %} {% endif %}"
item9:
value_template: "{% if states.sensor.todo_list_2.state | int > 9 %} {{states.sensor.todo_list_2.attributes.tasks[9].content }} {% else %} {% endif %}"
ESPHome Config
font:
- file: "gfonts://Mukta"
id: font1
size: 32
glyphs: "!\"%()+=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz'>?/&"
spi:
clk_pin: 13
mosi_pin: 14
text_sensor:
- platform: homeassistant
name: "todo0"
entity_id: sensor.item0
id: todo0
- platform: homeassistant
name: "To-do List 1"
entity_id: sensor.item1
id: todo1
- platform: homeassistant
name: "To-do List 2"
entity_id: sensor.item2
id: todo2
- platform: homeassistant
name: "To-do List 3"
entity_id: sensor.item3
id: todo3
- platform: homeassistant
name: "To-do List 4"
entity_id: sensor.item4
id: todo4
- platform: homeassistant
name: "To-do List 5"
entity_id: sensor.item5
id: todo5
- platform: homeassistant
name: "To-do List 6"
entity_id: sensor.item6
id: todo6
- platform: homeassistant
name: "To-do List 7"
entity_id: sensor.item7
id: todo7
- platform: homeassistant
name: "To-do List 8"
entity_id: sensor.item8
id: todo8
- platform: homeassistant
name: "To-do List 9"
entity_id: sensor.item9
id: todo9
display:
- platform: waveshare_epaper
cs_pin: 15
dc_pin: 27
busy_pin: 25
reset_pin: 26
model: 7.50inV2
reset_duration: 2ms
update_interval: 10sec
lambda: |-
int x = 36;
it.printf(x, 0, id(font1), "=> %s", id(todo0).state.c_str());
it.printf(x, 40, id(font1), "=> %s", id(todo1).state.c_str());
it.printf(x, 80, id(font1), "=> %s", id(todo2).state.c_str());
it.printf(x, 120, id(font1), "=> %s", id(todo3).state.c_str());
it.printf(x, 160, id(font1), "=> %s", id(todo4).state.c_str());
it.printf(x, 200, id(font1), "=> %s", id(todo5).state.c_str());
it.printf(x, 240, id(font1), "=> %s", id(todo6).state.c_str());
it.printf(x, 280, id(font1), "=> %s", id(todo7).state.c_str());
it.printf(x, 320, id(font1), "=> %s", id(todo8).state.c_str());
it.printf(x, 360, id(font1), "=> %s", id(todo9).state.c_str());
deep_sleep:
run_duration: 60s
sleep_duration: 60min