Since this is the Home Assistant Automation thread I'll assume you're asking these questions in the context of HA. Some of this is possible with HA, some of it is not.
Do you have HA deployed with the Lucid integration installed and functioning? That would be the first step. Once you have it...