in my preferences section i have this line:
input "motionKMS", "capability.motionSensor", title: "Kitchen Motion Sensor", required: true, multiple: false
i subscribe to motion active which is working fine. then in my event handler for that device i have this if check
if (event.device == motionKMS)
which is always false. but if i log.debug those 2 operands the string value logged seems to be the same.
what am i doing wrong?