Unable to configure the philips hue sensor to automate my lights

I hope that isn’t your automation config. Far too many capital letters and the states are not correctly quoted. Please share the actual yaml of the automation correctly formatted for the forum.