The comma is the key here. The “Yes,-” or “No,-“ is addressing the weather’s condition being nice or not. Saying “Yes,-“ would insinuate that you think the weather is nice, therefor disagreeing with Person A stating that it is not nice. Adding the “-it’s not.” would then make the sentence an oxymoron.
Responding “No,-“ is agreeing that the weather is in fact not nice. How I think about it is like this- remove the “it’s not” and replace it with the weather’s condition. You would say “No, the weather is not nice” to continue the negative of the “not”.
“No,…” to state that the weather is not nice, then the “…it’s not” to clarify your agreement.
I realize I gave two reasonings there as if they were the same, I got carried away.