I have an automation (actually an AppDaemon script) that works off the imap content_sensor, firing when it sees a specific email in the sensor. Triggered by a state change.
Works great, except when I reboot HA, at which point it fires again based on the last email, as the state apparently changes on initialization.
Is there any way to prevent this? Clear the sensor somehow, or get it to remember the state from before reboot and not report a state change?