Skip to content
Get started

RX8025T Time Source

The rx8025t time platform lets you use the Epson RX8025T real time clock as a time source. The chip keeps time from a backup battery while the device is powered off and is connected over I²C.

You first need to set up the I2C component.

# Example configuration entry
time:
- platform: rx8025t
id: rx8025t_time
  • address (Optional, int): Manually specify the I²C address of the RTC. Defaults to 0x32.
  • All other options from Base Time Configuration.

This Action triggers a synchronization of the current system time to the RTC hardware.

NOTE

The RX8025T component will not write to the RTC clock if not triggered explicitly by this action.

on_...:
- rx8025t.write_time
# in case you need to specify the RX8025T id
- rx8025t.write_time:
id: rx8025t_time

This Action triggers a synchronization of the current system time from the RTC hardware.

NOTE

The RX8025T component will automatically read the RTC clock every 15 minutes by default and synchronize the system clock when a valid timestamp is read from the RTC. (The update_interval can be changed.) This action can be used to trigger additional synchronizations.

on_...:
- rx8025t.read_time
# in case you need to specify the RX8025T id
- rx8025t.read_time:
id: rx8025t_time

When the RTC’s oscillator has stopped, for example because the backup battery was removed or ran flat, the chip sets its VLF flag. While that flag is set the component logs a warning, treats the stored time as invalid and does not synchronize it to the system clock. The flag is cleared by the next successful rx8025t.write_time, after which reads resume normally. The full configuration example below handles this case by writing the time whenever an external source has synchronized.

In a typical setup, you will have at least one additional time source to synchronize the RTC with. Such an external time source might not always be available e.g. due to a limited network connection. In order to have a valid, reliable system time, the system should read the RTC once at start and then try to synchronize with an external reliable time source. When a synchronization to another time source was successful, the RTC can be resynchronized.

esphome:
on_boot:
then:
# read the RTC time once when the system boots
rx8025t.read_time:
time:
- platform: rx8025t
# repeated synchronization is not necessary unless the external RTC
# is much more accurate than the internal clock
update_interval: never
- platform: homeassistant
# instead try to synchronize via network repeatedly ...
on_time_sync:
then:
# ... and update the RTC when the synchronization was successful
rx8025t.write_time: