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 click on Settings.
From the configuration menu select: Devices & Services.
In the bottom right, click on the Add Integration button.
From the list, search and select “Uptime”.
Follow the instruction on screen to complete the set up.