if someone finds this and has problems geting it to work, here is my working automations yaml script: