Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to use DS3231/SD8931 Real-Time Clock by ESPHome
#3
sure, here is yaml i have tested.
Code:
esphome:
  name: a16v3-ds3231-temperature
  friendly_name: A16v3 RTC Temperature
  min_version: 2026.11.0

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf

logger:

i2c:
  sda: GPIO9
  scl: GPIO10
  frequency: 100kHz
  scan: true

ds3231:
  address: 0x68

sensor:
  - platform: ds3231
    id: rtc_temperature
    name: "RTC Chip Temperature"
    accuracy_decimals: 2
    update_interval: 5s  # Poll the latest result; automatic conversions occur every 64 s.

font:
  - file: "gfonts://Roboto Mono"
    id: label_font
    size: 13
  - file: "gfonts://Roboto Mono"
    id: value_font
    size: 25
    glyphs: " -0123456789.C"

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    update_interval: 1s
    lambda: |-
      it.print(0, 0, id(label_font), "DS3231 CHIP TEMP");
      if (id(rtc_temperature).has_state() && std::isfinite(id(rtc_temperature).state)) {
        it.printf(64, 25, id(value_font), TextAlign::TOP_CENTER,
                  "%.2f C", id(rtc_temperature).state);
      } else {
        it.print(0, 30, id(label_font), "Waiting for data");
      }
yaml file download:

.txt   a16v3-ds3231-temperature.txt (Size: 1.09 KB / Downloads: 28)
   
Reply


Messages In This Thread
RE: how to use DS3231/SD8931 Real-Time Clock by ESPHome - by admin - 11-26-2026, 11:29 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)