Combining components of like type?

In trying to understand Home Assistant and Hass.io and the configuration.yaml file, I noticed that the yr sensor was installed by default and was listed in the config file as:

sensor:
  - platform: yr

Later I added the Weather Underground component to the config file as required.

sensor:
  - platform: wunderground
    api_key: your_api_key
    monitored_conditions:
      - alerts

Then I thought, they both have “sensor:” in them, why not combine them? So I did this:

sensor:
  - platform: yr
  - platform: wunderground
    api_key: your_api_key
    monitored_conditions:
      - alerts

But that would not pass config check. The question is why not? Is this by design, or do I have bad format in the config file?

Thank you in advance.

You have a bad format.
Try adding at least one option to the YR sensor, like for example name or monitored conditions

1 Like

Thank you treno. That worked.