AmoebeLabs / Material3-Theme-Template

Template for M3 themes
MIT License
3 stars 1 forks source link

Duplicate Keys #1

Open smiller171 opened 2 years ago

smiller171 commented 2 years ago

VSCode is showing duplicate keys in the yaml. Not sure if HomeAssistant will drop these, use first in, or last in

image

AmoebeLabs commented 2 years ago

That should be correct, as the same key (CSS color variable) is defined for Light mode and Dark mode.

Home Assistant will use only one of those keys depending on the selected Theme mode.

smiller171 commented 2 years ago

These are duplicate keys within the same object. The yaml language server in VSCode won't alert for the same key in different objects, only for duplicates within the same object.

AmoebeLabs commented 2 years ago

I have checked VSCode. Some files don't give any error, but others show 5 duplicate keys.

image

Home Assistant will simply ignore this. The second definition overwrites the first.

This 'problem' also occurs when using YAML overrides, which is a built-in feature of the YAML parser. Home Assistant complains in that case, but you can't do anything about that, because it is the parser that is causing those double keys...

I will check the duplicates, as they should not be there!