trombik / esphome-component-ds1302

A ds1302 component for esphome. This is a drop-in replacement of ds1307
ISC License
3 stars 3 forks source link

Error compiling package with ds1302 component #4

Open fifthstreet opened 9 months ago

fifthstreet commented 9 months ago

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:

time source

i2c: sda: 4 scl: 5 frequency: 400kHz

font:

external_components:

display:

trombik commented 9 months ago

the library uses internals of esphome. the structure that caused the error is gone.

electro-nic commented 6 months ago

ESPHome 2023.12.9 all ok. Thank you. Close issue