Need help splitting up my configuration

So I would like to clean up my configuration.yaml a bit and started splitting it up.

However, I’m a bit confused when it comes to plant sensors. I seemingly cannot do the following:

plant: !include plants.yaml

Is it because the plant component is derived from the sensor integration?

What are the contents of plants.yaml? And is it named plants.yaml or plant.yaml?

It’s named plants.yaml as specified in the config. The contents of the file is as follows:

# Plants
plant:
  zamioculcas:
    sensors:
      moisture: sensor.zamioculcas_moisture
      battery: sensor.zamioculcas_battery
      temperature: sensor.zamioculcas_temperature
      conductivity: sensor.zamioculcas_conductivity
      brightness: sensor.zamioculcas_light
    min_moisture: 15
    max_moisture: 60
    min_battery: 20
    min_conductivity: 350
    min_temperature: 10
    max_temperature: 32

When checking the config I get the following error:

Failed config
General Errors:
- Integration not found: plant

Ok, so in configuration.yaml:

plant: !include plants.yaml

and in your plants file

  zamioculcas:
    sensors:
      moisture: sensor.zamioculcas_moisture
      battery: sensor.zamioculcas_battery
      temperature: sensor.zamioculcas_temperature
      conductivity: sensor.zamioculcas_conductivity
      brightness: sensor.zamioculcas_light
    min_moisture: 15
    max_moisture: 60
    min_battery: 20
    min_conductivity: 350
    min_temperature: 10
    max_temperature: 32
2 Likes

Thanks, that worked well!

1 Like