Assign devices to areas from YAML

I created a group light using YAML and then assigned the new device to an area using the UI. Is there a way to assign the light to an an area using the YAML configuration? Alternatively, how could I create an automation that triggers a persistent notification when there are devices that haven’t yet been assigned to an area?