Yes, that’s why I suggested to use a espHome based solution for advanced local logic possibilities 
And well… for the rest you might get closer soon… 
My bullshit meter says 100% of text is likely AI 
@MrJelly17 pay special attention to point 
, it seems it is not your first AI “powered” reply here 