Welcome!
OK, I just have to say, in jest, who doesn't use housecode "M" for Macros?
However, I always shy away from using housecode "A" for anything. It is the default for many things, and IMHO, by not using the default, might save you a debugging headache years from now.
For your M1 'off' macro, you need to do add a second (called an "else") macro. You make the first macro that checks for daytime, and only does a ‘turn TV & stereo OFF’. Then make an "else" macro that checks for nighttime, and does a ‘turn TV & stereo OFF’ plus a "lamp ON". Yea, I know in true programming, the else would not need to re-check the same conditional, but AHP is kind-of odd, and IMHO, it is safer to do the extra re-check.