It’s not easy and pretty much impossible if the device doesn’t immediately report that it changed state when you manually flip the switch. You will find that only the minority of devices actually do so.
If this device is one that immediately reports its status see Design Pattern: Manual Trigger Detection.
Thomas’ approach is a special case of the Proxy Items approach only it uses a Group instead of a proxy Item.