Don't know if you saw the below post, but utilizing that device is the simplest way to achieve this automation.