Integration with systemd notify

The problem

When starting home assistant as a systemd service, the systemd daemon is not able to know when the HA HTTP server is ready.

Proposal

The proposal is to have a command-line argument that will enable notifying systemd when hass state switches to CoreState.running. Such configuration would be propagated from the command line to hass config.

If this is deemed reasonable/upstreamable, I can contribute.

You could do that in an automation, having it call systemd-notify.

It’s a nice idea, but given that the majority of installs use Docker, and not systemd, I’m not sure whether the devs would be interested in including it.

The issue with having it as an integration is that there will be a dangerous dependency between the configuration (which enables the integration) and the systemd service type.

For reference, this is the integration I’m working with now: https://github.com/meta-homeassistant/meta-homeassistant/blob/7de873c320fb20414738ad02ee45fc0e3e4a1e0b/recipes-homeassistant/homeassistant/files/0001-Add-support-for-systemd-notify.patch