I have some ikea lights connected to zigbee2mqtt right now, I don’t have a remote control for these, but turn them on and off with a “regular” switch. This results in them currently standing as On even though I physically closed them. If I try to change the status it goes back to on because it doesn’t make contact with the lamp. Is there any way to detect that when a lamp has been last seen for, for example, 10 minutes, that you can change the status in the home assistant to off?
The better way would be to keep them powered on all the time. This is better for your Zigbee mesh too. You can control the lights with a separate switch/dimmer. I’ve seen 3D-printed covers that you can place over the existing switch and have placement for a smart switch / dimmer.
Or you could go the route of using a in-wall dimmer/switch controllable by the old light switch, but then you would need to change the bulbs.
Most of the lights I have are controlled that way, but I have a few that I haven’t had time to fix yet. The idea was that when we go away I could use history to turn these on and off as if we were at home but now it will be 24/7 ON.
You are using the device in a way that it is not meant to be used so that is really user-error, as you should not be regularly be turning on an off products that are Zigbee Router devices. You could add some more Zigbee Router devices to possibly allieveioate the problem a little, but that alone is not a proper full solution, see → Zigbee networks: how to guide for avoiding interference + optimize using Zigbee Router devices (repeaters/extenders) to get a stable network with best possible range and coverage
Zigbee Router devices should always be powered/connected, so a proper solution would instead be to either replace the switch with a smart switch that works in “detached mode” (so it does not cut power to the lights) or replace the lights with model(s) that does not act like a Zigbee Router devices, like for the example lightbulbs from Sengled → Mains powered Zigbee devices that aren't routers
Why not invest in motion sensors and remotes? I use Aqara P1’s and Hue Dimmers as they’re cheap. It seems to go against the whole principle of smart bulbs and Home Assistant switching smart bulbs using a regular switch. I don’t touch light switches anymore, and have actually bridged some switches with a Wago.