The uptime integration provides a sensor that stores the timestamp (date and time) when Home Assistant was last started.
Adding Uptime to your Home Assistant instance can be done via the user interface, by using this My button:
If the above My button doesn’t work, you can also perform the following steps manually:
Browse to your Home Assistant instance.
In the sidebar, select Settings.
From the configuration menu, select Devices & Services.
In the bottom right, select the Add Integration button.
From the list, search and select Uptime.
Follow the instructions on screen to complete the setup.