If you are using version 0.94 or higher, there’s no pressing need to use it. If you are in the habit of manually turning off an automation, then forgetting to turn it back on,
initial_state: true will automatically turn on the automation when Home Assistant starts. Conversely, if you have an automation that you use very rarely (it’s normally turned off), adding
initial_state: false to it will ensure it is always turned off on startup.
If you don’t use
initial_state, Home Assistant’s restore feature will set the automation to whatever state it was in prior to the restart. If it was
on it is restored to
on. If it was
off, it’s restored to
If you are using a version that’s older than 0.94, then there’s another use for
initial_state. Prior to 0.94, there was a bug in the restore feature. Sometimes on startup it would turn off automations. That would happen without you knowing it. There are dozens of posts in this forum asking why an automation refuses to trigger, only to discover the answer is simply because the automation is off! The first post in this thread is an example of that. The bandaid solution to the restoration bug was to simply slap
initial_state: true onto every automation to ensure it wouldn’t get turned off.
Anyway, that’s all ancient history and the bandaid is no longer needed, provided you are using version 0.94 or higher.