uptime sensor platform displays the time since the last Home Assistant restart.
To enable this sensor, add the following lines to your
# Example configuration.yaml entry sensor: - platform: uptime
name (Optional): Name of the sensor. Defaults to
unit_of_measurement (Optional): Units for uptime measurement in either
minutes. Defaults to
# Example with configuration variables sensor: - platform: uptime name: Time Online unit_of_measurement: hours