INFO ESPHome 2023.10.6
INFO Reading configuration /config/esphome-web-266e3c.yaml...
INFO Detected timezone 'Etc/UTC'
INFO Generating C++ source...
INFO Compiling app...
Processing esphome-clock (board: nodemcuv2; framework: arduino; platform: platformio/espressif8266@3.2.0)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Dependency Graph
|-- ESPAsyncTCP-esphome @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 1.1.1
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
|-- Wire @ 1.0
Compiling .pioenvs/esphome-clock/src/esphome/components/ds1302/ds1302.cpp.o
Compiling .pioenvs/esphome-clock/src/esphome/components/font/font.cpp.o
Compiling .pioenvs/esphome-clock/src/esphome/components/i2c/i2c.cpp.o
Compiling .pioenvs/esphome-clock/src/esphome/components/i2c/i2c_bus_arduino.cpp.o
src/esphome/components/ds1302/ds1302.cpp: In member function 'void esphome::ds1302::DS1302Component::read_time()':
src/esphome/components/ds1302/ds1302.cpp:103:9: error: 'ESPTime' is not a member of 'esphome::time'; did you mean 'esphome::ESPTime'?
103 | time::ESPTime rtc_time{.second = uint8t(ds1302.reg.second + 10 * ds1302_.reg.second_10),
| ^~~
In file included from src/esphome/components/time/real_time_clock.h:8,
from src/esphome/components/ds1302/ds1302.h:32,
from src/esphome/components/ds1302/ds1302.cpp:34:
src/esphome/core/time.h:12:8: note: 'esphome::ESPTime' declared here
12 | struct ESPTime {
| ^~~
src/esphome/components/ds1302/ds1302.cpp:112:3: error: 'rtc_time' was not declared in this scope; did you mean 'read_time'?
112 | rtc_time.recalc_timestamp_utc(false);
| ^~~~
| read_time
*** [.pioenvs/esphome-clock/src/esphome/components/ds1302/ds1302.cpp.o] Error 1
========================== [FAILED] Took 9.27 seconds ==========================
Getting this error compiling a package..
INFO ESPHome 2023.10.6 INFO Reading configuration /config/esphome-web-266e3c.yaml... INFO Detected timezone 'Etc/UTC' INFO Generating C++ source... INFO Compiling app... Processing esphome-clock (board: nodemcuv2; framework: arduino; platform: platformio/espressif8266@3.2.0)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash Dependency Graph |-- ESPAsyncTCP-esphome @ 2.0.0 |-- ESPAsyncWebServer-esphome @ 3.1.0 |-- DNSServer @ 1.1.1 |-- ESP8266WiFi @ 1.0 |-- ESP8266mDNS @ 1.2 |-- noise-c @ 0.1.4 |-- Wire @ 1.0 Compiling .pioenvs/esphome-clock/src/esphome/components/ds1302/ds1302.cpp.o Compiling .pioenvs/esphome-clock/src/esphome/components/font/font.cpp.o Compiling .pioenvs/esphome-clock/src/esphome/components/i2c/i2c.cpp.o Compiling .pioenvs/esphome-clock/src/esphome/components/i2c/i2c_bus_arduino.cpp.o src/esphome/components/ds1302/ds1302.cpp: In member function 'void esphome::ds1302::DS1302Component::read_time()': src/esphome/components/ds1302/ds1302.cpp:103:9: error: 'ESPTime' is not a member of 'esphome::time'; did you mean 'esphome::ESPTime'? 103 | time::ESPTime rtc_time{.second = uint8t(ds1302.reg.second + 10 * ds1302_.reg.second_10), | ^
~~ In file included from src/esphome/components/time/real_time_clock.h:8, from src/esphome/components/ds1302/ds1302.h:32, from src/esphome/components/ds1302/ds1302.cpp:34: src/esphome/core/time.h:12:8: note: 'esphome::ESPTime' declared here 12 | struct ESPTime { | ^~~ src/esphome/components/ds1302/ds1302.cpp:112:3: error: 'rtc_time' was not declared in this scope; did you mean 'read_time'? 112 | rtc_time.recalc_timestamp_utc(false); | ^~~~ | read_time *** [.pioenvs/esphome-clock/src/esphome/components/ds1302/ds1302.cpp.o] Error 1 ========================== [FAILED] Took 9.27 seconds ==========================YAML is:
esphome: name: esphome-clock friendly_name: ESPHome-clock on_boot: then: ds1302.read_time:
esp8266: board: esp01_1m
logger:
api: encryption: key: "xxxx="
ota:
wifi: ssid: !secret wifi_ssid password: !secret wifi_password
ap: ssid: "esphome-clock" password: !secret ap_password
captive_portal:
time:
cs is rst
cs_pin: GPIO0 dio_pin: GPIO2 clk_pin: GPIO14 update_interval: never
time source
i2c: sda: 4 scl: 5 frequency: 400kHz
font:
external_components:
display:
lambda: |- auto time = id(ds1302_time).now(); if (time.is_valid()) { it.strftime(it.get_width() / 2 - 2, it.get_height() / 2 - 2, id(font1), TextAlign::CENTER, "%I:%M %p", id(ds1302_time).now()); }