How to automate to turn screen on with /sys/class/gpio/gpio18/value

Hi everyone. My Android wall panel (S9E from Smatek) has a rather unsual proximity sensor. It doesn’t read out a distance value. Nor is it visible to the system with whatever the usual means are. Using an app like Sensor Test, for example, the sensor is not found.

But it’s definitely present. What it does is that when it senses something is near, it writes to /sys/class/gpio/gpio18/value a “1”. And “0” when nothing is sensed.

My question is, how do I go about using this to turn on the panel’s screen (or anything other action for that matter).

I have tried using Automagic. It does have a “Command Output” as a trigger. And using “cat /sys/class/gpio/gpio18/value” it can certainly read the “1” or the “0”. But that “trigger” doesn’t actually trigger itself - as in, the only way to read the value with Command Output in Automagic is to press the “test command” button. Otherwise, the command itself doesn’t periodically execute to read the value. I could be going down the wrong rabbit hole entirely with this.

Can anybody shed some light on how to go about using a sensor like this? Thanks in advance.