How to add service?

I am trying to implement a way how to manually invoke a CO2 sensor calibration.
I found many posts covering this topic pointing me to very similar point:

“you could set up a HA service:”

api:
  services:
    - service: sensair_background_calibrate
      then:
        - senseair.background_calibration: sensair_s8

I am getting lost where does one (in 2024) set up a service? Perhaps the configuration or terminology changed?
I can navigate to SettingsDevices & services
and there I am facing options Integrations, Devices, Entities, Helpers.
Where do I look for Services?
I can find and edit configuration.yaml or automations.yaml but no (perhaps?) services.yaml.

What did I miss? Thanks!

Pretty sure that is ESP Home code there and not Home Assistant code.
What you would do on Home Assistant is create a command_line service that runs some sort of script or HTTP Post with curl or something. It’s difficult to help more without knowing how exactly you go about initiating the calibration.

1 Like

That looks like an ESPHome config. So it would go in the device yaml file for the ESP device.

Thanks!
That points me to the right direction <3