When I unfold the folding chair and sit at the desk, the desk lamp turns on automatically.
I live in a studio, so space is tight. I keep a folding chair stored upright and only unfold it when I actually use the desk. I attached a contact sensor to the chair at a spot where the sensor reads Closed while the chair is folded and Open when the chair is unfolded. In my automation, Closed = not using the desk and Open = using the desk, so the desk lamp turns on when the chair is unfolded and turns off when it’s folded back.
I paired an IKEA PARASOLL door/window (contact) sensor and a TRÅDFRI GU10 smart bulb with the DIRIGERA hub, then brought them into Apple’s Home app via the Apple Home integration in the IKEA Home smart app. You can check the sensor state and control the light in this setup, but to create automations you also need a Home hub added to the Home app—such as a HomePod, HomePod mini, or Apple TV.
Required Devices