Skip to content
Get started

DS3231 Temperature Sensor

The ds3231 sensor platform reads the temperature measured by the DS3231 real-time clock. The chip uses this reading internally to compensate its oscillator; it has 0.25 °C resolution.

Set up the ds3231 hub (and the I²C bus it needs) first.

# Example configuration entry
sensor:
- platform: ds3231
name: "RTC Temperature"
  • ds3231_id (Optional, ID): The ID of the ds3231 hub to use when more than one is configured.
  • update_interval (Optional, Time): How often to read the temperature. Defaults to 60s.
  • All other options from Sensor.

The temperature is reported in degrees Celsius. To publish another unit, convert the value with sensor filters and set unit_of_measurement to match.

NOTE

The DS3231 runs a temperature conversion on its own every 64 seconds. Reading more often than that returns the same value until the next conversion. Use the ds3231.force_temperature_conversion action to trigger a conversion on demand. The chip needs about 200 ms to finish, so the new value appears on the first sensor update after that.