twilight sentinel on 2004 Cadillac DeVille

Headlights are on during daylight with twilight in on position-is it the sensor on the dash and can I replace it myself.

Asked by for the 2004 Cadillac DeVille
i can not adv unless a diag is done,it could be either. if there is a wrecking yard avail. see if they have both parts cheap and maybe repl both