Stop fumbling in the dark. Install an occupancy sensor instead. These smart home must-haves automatically turn the lights on when you enter the room. Plus, they automatically turn off when you leave, ...
And add the following to the accessories list in your Homebridge config. Change names as you wish. { "accessory": "Occupancy Switch", "occupancy_sensor_name ...