More sensors in file

Hello.

What I need to write to file: configuration.yaml If I need have in file more than one sensor?
If I have only one sensor in file, home assistant is up, If I have two or more sensors in file,
home assistant is down.
Please do you help me how I have to write sensors to configuration file and home assistant will up?

Your first sensor should look like this:

sensor:
  whatever options or settings

Your next sensor needs to look like this:

sensor 2:
   whatever options or settings

When numbering any device, sensor, camera, etc. the first instance is the name, the next instance is name 2:, then name 3: and so on.

I tried what you write to me.
My file if home assistant is up:

homeassistant:

  # Nazov pre domacu atomatizaciu
  name: Detkovi

  #Typ jednotky pre zobrazovanie teploty
  temperature_unit: C

  # Casova zona
  time_zone: Europe/Bratislava

# Enables support for tracking state changes over time.
history:

# Track the sun
sun:

#Udaje o CPU
sensor:
  platform: cpuspeed
  name: CPU

# Discover some devices automatically
discovery:

# Enables the frontend
frontend:

# Allows you to issue voice commands from the frontend
conversation:

# Checks for available updates
updater:

# View all events in a logbook
logbook:

And my file if home assistatn si down:

homeassistant:

  # Nazov pre domacu atomatizaciu
  name: Detkovi

  # Typ jednotky pre zobrazovanie teploty
  temperature_unit: C

  # Casova zona
  time_zone: Europe/Bratislava

# Enables support for tracking state changes over time.
history:

# Track the sun
sun:

#Udaje o CPU
sensor:
  platform: cpuspeed
  name: CPU

sensor 2:
  platform: speedtest
  monitored_conditions:
    - ping
    - download
    - upload

# Discover some devices automatically
discovery:

# Enables the frontend
frontend:

# Allows you to issue voice commands from the frontend
conversation:

# Checks for available updates
updater:

# View all events in a logbook
logbook:

Where can I get errors in the file?

What errors are you getting?