Allow --script check_config to exclude custom components

For those using custom components via HACS, the check_config script is not that useful.
I am trying to run this in a CI pipeline but validating the config always fails because the platforms are not known to HA core:

Failed config
  General Errors: 
    - Platform error media_player.samsungtv_custom - Integration 'samsungtv_custom' not found.
    - Platform error sensor.plex_recently_added - Integration 'plex_recently_added' not found.
    - Platform error sensor.radarr_upcoming_media - Integration 'radarr_upcoming_media' not found.
    - Platform error sensor.sonarr_upcoming_media - Integration 'sonarr_upcoming_media' not found.
    - Platform error sensor.buienalarm - Integration 'buienalarm' not found.

Maybe we could exclude certain components like this:

$ python -m homeassistant --config . \
    --script check_config \
    --custom-components "media_player.samsungtv_custom,sensor.plex_recently_added,sensor.radarr_upcoming_media,sensor.sonarr_upcoming_media,sensor.buienalarm" \
    --info all

The script is there to check the configuration is valid. There’s no point in running the script if you’re ignoring parts of the configuration. You need to include the customs components in the configuration that’s being tested. Just un-ignore the custom_components directory.

Aha I see. It is indeed excluded.

Which makes checking your config a lot harder if you are using HACS. I don’t directly commit my custom_components to the repo, instead HACS downloads them for me.

Yes, but there’s no reason to exclude them from your git.

They aren’t. Build is still failing due to that command not recognising them as valid platforms

In your custom_components folder on GitHub you have hacs, telemeter and vrtnws. You don’t have any of the ones your config checker is failing on. That’s why it’s failing. You need to include (that is to say not exclude) all of them.