Moon and sun confused on new system

Hmm - strange. Just tried this and can confirm that the sun sensor uses the right icon… until you configure the moon sensor in HA! That’s when things get messy and it no longer uses the right icon, as far as I can tell.
I think (I will test again) that even with the moon sensor added to configuration.yaml - the sun showed the correct icon in Lovelace, until I added the Moon badge to Lovelace. Even after then removing it from lovelace, the sun shows the moon icon.
I have now removed the moon from my configuration.yaml - the moon.moon entity no longer exists. However, Lovelace has now replaced the sun icon by the moon icon, and it seems stuck.

Looks like a bug to me.

With regards the moon badge, it shows text. If you want to show an icon to represent the moon state, have a look here.