Create integration to easily install an RTC on the Raspberry Pi with Home Assistant

After having problems with the internet and discovering that Home Assistant does not allow me to manually correct the date and time, I researched a way to add an RTC device to the Raspberry Pi (a lack that I consider a serious flaw in the hardware).
I discovered that the best device for this is the DS3231 device, which is cheap, easy to find and install on the Raspberry Pi.
However, just as Home Assistant does not allow me to correct the date and time if there is no internet, it also does not make it easy to install and recognize an RTC device.
In my experience, I discovered two things:

  1. The Raspberry Pi is an exceptional piece of hardware for Home Assistant. Mine only has 4 GB of RAM and, even so, it works very well.

  2. The fact that Home Assistant depends on an NTP server to control the date and time is a serious flaw that needs to be corrected urgently.

Since the Raspberry Pi allows you to install an RTC in a simple way, HA OS only needs to allow you to enable this feature, either through some native integration or through some command released specifically for this purpose.

Hi wfox,

Do you connect your pi to a router, or use the internet at all? Even RTC’s have to be set.
It’s not 1985 where you needed a clock because there is no interwebs to set it from.

I’m really not trying to be negative but keeping time integration exists and is built in using time servers found in your router and your ISP and a hundred other sources on the net.

When they announced the yellow (based on a Pi compute module and containing a RTC) my comment was ‘finally HA OS will get support for a RTC’, but I guess it is still limited to the yellow.

Voted.

I chose HA for home automation precisely because, theoretically, it could be a local solution that is “independent” of the internet.
But this is proving to be false.
My HA is connected to the internet, but I noticed that every time it loses connection for any reason, a series of “problems” start to appear and HA can even crash.
If HA doesn’t work well without the internet, it simply loses its reason for existing. Any other online automation (Tuya, SmartThinks, Smart Home…) becomes more advantageous because they are less complex and more stable.