Its a way, and it looks like it should work fine..
Afaik it wont sd-burn your card.. its a small process and unless your making high ram demands on your pi there should be no reason to swap it out of active memory to swapfile.
with the same h/w i would also install and update Mosquitto Mqtt Broker and NodeRed s/w.
I would then configure Nodered to publish a 'someone entered' mqtt topic/payload on the gpio.rising event
anda 'someone leaving' mqtt topic/payload on the gpio.falling event.
Then Also using Node red i would create flows to respond to the subscription of the topics above. (turn on/off the light) and anything else, If after 8pm set alarm for example ??
Nodered is drag n drop with just a few simple 'object' edits to complete your job, lots of getting started help too etc..
So Why would i add all that extra s/w and make it a bit more complicated??
Mosquitto a MQTT broker provides a method to send and receive or Publish and subscribe to, messages or topics/payloads.
This while core to NodeRed connectivity also provides you with an out of the box wifi interface enabeling you to add remote wifi sensors to your system with a simple configuration edit.
NodeRed provides you with a very powerful control interface for a system building. And a dashboard interface for a nice gui too
Alternatively there are also systems designed specifically for 'home' automation like openhab..
To compliment a Pi with Mosquitto and nodered i find esp8266 based boards and controllers are a nice cheap way to add wireless sensors and relays for input and output controlled by your pi..
Assuming your pi control system will expand.. if not leave as is if happy
hope thats helpful