Looking to replace an old switch. What I see in the box is 3 old (knob-and-tube) wires coming in, two of them connected together and then connected to the switched side of the switch, the other input connected to the input side of the switch. I can't tell how the wires are associated outside the box (with NM cable one can, and it's often useful).
This doesn't match what I'd expect either from a "normal" installation (hot into the box to the switch, switched out of the box and up to the fixture, neutral through the box up to the fixture) or a switch loop (neutral to the fixture, hot down to the box, through the switch, and switched back up to the fixture).
Furthermore, the join is on the switched side. The other theory, then, is that there's an additional downstream device (lamp, receptacle, whatever) that is also switched by this switch). If true, I have no idea what it is (and I've lived in this house for more than 25 years). No receptacle that mysteriously doesn't work sometimes, for example. (And this is a bedroom light, it's on some but off quite a lot also, something that didn't work when this was off would show up!) (Yet another theory is that it's the incoming hot that joins off to power something else plus go to the switch, and the blue wire is wired to hot, and the black wire is the switched output. That'd work on a normal switch, which is symmetrical, but I don't think that should work on an X-10 dimmer switch, which is what this is.)
The switch being replaced is an old X10. Which works fine, including dimming the LED bulbs in the ceiling fixture. Which I think is some evidence that it's not wired "backwards" as I speculated above.
Next step is to disconnect the switch, power the circuit back on, and check which of the incoming lines is hot, I guess. Try it with a basic mechanical switch, see what happens.
I think I'm going to find no neutral in this box, so actually replacing the switch will have to wait for some Zwave switches on order that will work in that situation. The other light switches I've checked on this floor are all wired as switch loops; this one can't be a simple switch loop, though it might be a switch loop also controlling a second location.
Always an adventure! Every time one looks inside the walls (or tests remotely what's going on in there).