Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e46f60b65 | |||
| 9e7684e294 |
@@ -22,6 +22,8 @@ esp32:
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: esp-idf
|
||||
advanced:
|
||||
minimum_chip_revision: "3.0"
|
||||
|
||||
wifi:
|
||||
ssid: "Voltage-legacy"
|
||||
@@ -49,6 +51,13 @@ api:
|
||||
# Include ArduinoJson support for the compact calendar event feed.
|
||||
json:
|
||||
|
||||
# Avoid refreshing the panel when Home Assistant republishes unchanged calendar data.
|
||||
globals:
|
||||
- id: last_rendered_calendar_entries
|
||||
type: std::string
|
||||
restore_value: no
|
||||
initial_value: '""'
|
||||
|
||||
ota:
|
||||
platform: esphome
|
||||
password: !secret ota
|
||||
@@ -220,6 +229,17 @@ text_sensor:
|
||||
entity_id: sensor.epaper_kalenderdaten
|
||||
attribute: entries
|
||||
id: calendar_entries
|
||||
on_value:
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
and:
|
||||
- display.is_displaying_page: calendar
|
||||
- lambda: return x != id(last_rendered_calendar_entries);
|
||||
then:
|
||||
- lambda: id(last_rendered_calendar_entries) = x;
|
||||
- component.update: epaper
|
||||
|
||||
|
||||
# Home Assistant selects one quote per day from its local quote library.
|
||||
- platform: homeassistant
|
||||
@@ -241,13 +261,18 @@ time:
|
||||
- output.turn_on: power_key
|
||||
- delay: 0.5s
|
||||
- output.turn_off: power_key
|
||||
# Every 10 minutes
|
||||
# Refresh environmental readings every 10 minutes. The calendar page is
|
||||
# redrawn only when its event feed actually changes.
|
||||
- seconds: 0
|
||||
minutes: /10
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
display.is_displaying_page: environment
|
||||
then:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "Timer based screen refresh"
|
||||
format: "Timer based environment screen refresh"
|
||||
- component.update: epaper
|
||||
|
||||
# Font definitions
|
||||
|
||||
Reference in New Issue
Block a user