A state (timestamp) that is not affected by HA restarts?

Thanks - but that doesn’t help in my case. I’m specifically asking about binary_sensor and last_updated and last_modified. That example won’t work for any of those. I spoke w/ the author on github and if the entity type doesn’t have a service you can call, then it won’t work. So there is no way that extension to restore a binary_sensory value and no way to restore the updated/modified times.

you could use a helper as a workaround. so save the binary_sensor in the helper. Upon restart restore the helper and build your automation around the helper.