Skip to content
 
 

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Start Time for Home Assistant

GitHub Release License HACS Custom

CI Hassfest HACS validation Maintained Maintainer

A custom Home Assistant integration that exposes Home Assistant's own boot initialization time as a sensor.

Start Time sensor

Features

  • A Start Time sensor reporting the boot time in seconds — the same value Home Assistant logs at startup (Home Assistant initialized in 25.5s).
  • Per-integration setup durations exposed as sensor attributes, sorted from slowest to fastest — handy for spotting what slows your startup down.
  • Works independently of your logger component settings.

Requirements

  • Home Assistant 2025.1 or newer
  • Python 3.13 or newer

Installation

HACS (recommended)

  1. Open HACS in Home Assistant.
  2. Open the menu (top-right) → Custom repositories.
  3. Add foXaCe/StartTime with the category Integration.
  4. Search for Start Time and install it.
  5. Restart Home Assistant.
  6. Go to Settings → Devices & Services → Add Integration → Start Time.

Manual

  1. Copy the custom_components/start_time/ folder into your <config>/custom_components/ folder.
  2. Restart Home Assistant.
  3. Add the integration from the UI.

Configuration

Go to Settings → Devices & Services → Add Integration → Start Time.

There is nothing to configure. If the integration does not appear in the list, clear your browser cache and try again.

The sensor

  • State: the boot initialization time, in seconds.
  • Attributes: per-integration setup durations, sorted slowest first.

How it works

Home Assistant reports its initialization time in the INFO logs. This integration surfaces the same value as a sensor:

2020-02-24 17:13:11 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 25.5s

This is useful for debugging startup performance on slow hardware such as a Raspberry Pi.

Example automations

Get notified when Home Assistant took unusually long to start:

automation:
  - alias: "Notify on slow startup"
    triggers:
      - trigger: numeric_state
        entity_id: sensor.start_time
        above: 60
    actions:
      - action: notify.persistent_notification
        data:
          title: "Slow startup"
          message: >-
            Home Assistant took {{ states('sensor.start_time') }} seconds
            to start.

The per-integration setup durations are available as attributes, so you can watch a specific integration:

{{ state_attr('sensor.start_time', 'recorder') }}

Known limitations

  • The value is captured once per startup, when Home Assistant logs that it has finished initializing. It never changes until the next restart.
  • When the integration is added to an already-running instance, the sensor shows the value restored from the previous boot (or stays unknown on the very first install) until Home Assistant is restarted.
  • The capture relies on the Home Assistant initialized in X.XXs log record emitted by homeassistant.bootstrap — Home Assistant exposes this value through no public API. The test suite guards the message format on every supported release.
  • Per-integration attributes are intentionally not recorded in the history database (they change on every boot and would bloat the recorder); they are always available live and in the integration diagnostics.

Removal

  1. Go to Settings → Devices & Services, open Start Time and choose Delete from the entry menu.
  2. Remove the files: in HACS, open Start Time and choose Remove (manual install: delete the custom_components/start_time/ folder).
  3. Restart Home Assistant.

The integration keeps no leftover data: no options, no external connections, and its stored state is removed with the entity.

Contributing

Contributions are welcome — see CONTRIBUTING.md.

License

Released under the MIT License. This is a maintained fork of AlexxIT/StartTime.

About

Start Time sensor for Home Assistant — boot initialization time as a sensor

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages