CUPS
The cups sensor platform uses the open source printing system CUPS
Setup
You will need to install the python3-dev or python3-devel package and the development files for CUPS (libcups2-dev orcups-devel) on your system manually (e.g., sudo apt-get install python3-dev libcups2-dev or sudo dnf -y install python3-devel cups-devel) along with a compiler (gcc). This integration doesn’t work out-of-the-box in a container-based setup.
To set up the sensor the “Queue Name” of the printer is needed. The fastest way to get it, is to visit the CUPS web interface at “http://[IP ADDRESS PRINT SERVER]:631” and go to “Printers”.
  
Configuration
To enable the CUPS sensor, add the following lines to your configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file.
After changing the configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file, restart Home Assistant to apply the changes.   The integration is now shown on the integrations page under Settings > Devices & services. Its entities are listed on the integration card itself and on the Entities tab.
# Example configuration.yaml entry
sensor:
  - platform: cups
    printers:
      - C410
      - C430
Configuration Variables
List of printers to add. If you’re not using a CUPS server, add your “Printer Name” here.
The IP address of the CUPS print server or of the printer.
Examples
Default configuration for an IPP printer:
# Example configuration.yaml entry for an IPP printer
sensor:
  - platform: cups
    host: PRINTER_IP
    is_cups_server: false
    printers:
      - ipp/print