No doubt in California this would show up as a trouble item in the OBD-II diagnostic and that would immediately fail its "smog" check.
Actually, you would probably not get away with having failed auto-headlight-dimming because you would annoy a cop going the other way and get a ticket. But features that aren't so obvious will go uninspected in many locations.