Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.cups.sensor Namespace Reference

Classes

class  CupsData
 
class  CupsSensor
 
class  IPPSensor
 
class  MarkerSensor
 

Functions

None setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string ATTR_DEVICE_URI = "device_uri"
 
string ATTR_MARKER_HIGH_LEVEL = "marker_high_level"
 
string ATTR_MARKER_LOW_LEVEL = "marker_low_level"
 
string ATTR_MARKER_TYPE = "marker_type"
 
string ATTR_PRINTER_INFO = "printer_info"
 
string ATTR_PRINTER_IS_SHARED = "printer_is_shared"
 
string ATTR_PRINTER_LOCATION = "printer_location"
 
string ATTR_PRINTER_MODEL = "printer_model"
 
string ATTR_PRINTER_NAME = "printer_name"
 
string ATTR_PRINTER_STATE_MESSAGE = "printer_state_message"
 
string ATTR_PRINTER_STATE_REASON = "printer_state_reason"
 
string ATTR_PRINTER_TYPE = "printer_type"
 
string ATTR_PRINTER_URI_SUPPORTED = "printer_uri_supported"
 
string CONF_IS_CUPS_SERVER = "is_cups_server"
 
string CONF_PRINTERS = "printers"
 
string DEFAULT_HOST = "127.0.0.1"
 
bool DEFAULT_IS_CUPS_SERVER = True
 
int DEFAULT_PORT = 631
 
string ICON_MARKER = "mdi:water"
 
string ICON_PRINTER = "mdi:printer"
 
 PLATFORM_SCHEMA
 
dictionary PRINTER_STATES = {3: "idle", 4: "printing", 5: "stopped"}
 
 SCAN_INTERVAL = timedelta(minutes=1)
 

Detailed Description

Details about printers which are connected to CUPS.

Function Documentation

◆ setup_platform()

None homeassistant.components.cups.sensor.setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the CUPS sensor.

Definition at line 63 of file sensor.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.cups.sensor._LOGGER = logging.getLogger(__name__)
private

Definition at line 23 of file sensor.py.

◆ ATTR_DEVICE_URI

string homeassistant.components.cups.sensor.ATTR_DEVICE_URI = "device_uri"

Definition at line 29 of file sensor.py.

◆ ATTR_MARKER_HIGH_LEVEL

string homeassistant.components.cups.sensor.ATTR_MARKER_HIGH_LEVEL = "marker_high_level"

Definition at line 27 of file sensor.py.

◆ ATTR_MARKER_LOW_LEVEL

string homeassistant.components.cups.sensor.ATTR_MARKER_LOW_LEVEL = "marker_low_level"

Definition at line 26 of file sensor.py.

◆ ATTR_MARKER_TYPE

string homeassistant.components.cups.sensor.ATTR_MARKER_TYPE = "marker_type"

Definition at line 25 of file sensor.py.

◆ ATTR_PRINTER_INFO

string homeassistant.components.cups.sensor.ATTR_PRINTER_INFO = "printer_info"

Definition at line 30 of file sensor.py.

◆ ATTR_PRINTER_IS_SHARED

string homeassistant.components.cups.sensor.ATTR_PRINTER_IS_SHARED = "printer_is_shared"

Definition at line 31 of file sensor.py.

◆ ATTR_PRINTER_LOCATION

string homeassistant.components.cups.sensor.ATTR_PRINTER_LOCATION = "printer_location"

Definition at line 32 of file sensor.py.

◆ ATTR_PRINTER_MODEL

string homeassistant.components.cups.sensor.ATTR_PRINTER_MODEL = "printer_model"

Definition at line 33 of file sensor.py.

◆ ATTR_PRINTER_NAME

string homeassistant.components.cups.sensor.ATTR_PRINTER_NAME = "printer_name"

Definition at line 28 of file sensor.py.

◆ ATTR_PRINTER_STATE_MESSAGE

string homeassistant.components.cups.sensor.ATTR_PRINTER_STATE_MESSAGE = "printer_state_message"

Definition at line 34 of file sensor.py.

◆ ATTR_PRINTER_STATE_REASON

string homeassistant.components.cups.sensor.ATTR_PRINTER_STATE_REASON = "printer_state_reason"

Definition at line 35 of file sensor.py.

◆ ATTR_PRINTER_TYPE

string homeassistant.components.cups.sensor.ATTR_PRINTER_TYPE = "printer_type"

Definition at line 36 of file sensor.py.

◆ ATTR_PRINTER_URI_SUPPORTED

string homeassistant.components.cups.sensor.ATTR_PRINTER_URI_SUPPORTED = "printer_uri_supported"

Definition at line 37 of file sensor.py.

◆ CONF_IS_CUPS_SERVER

string homeassistant.components.cups.sensor.CONF_IS_CUPS_SERVER = "is_cups_server"

Definition at line 40 of file sensor.py.

◆ CONF_PRINTERS

string homeassistant.components.cups.sensor.CONF_PRINTERS = "printers"

Definition at line 39 of file sensor.py.

◆ DEFAULT_HOST

string homeassistant.components.cups.sensor.DEFAULT_HOST = "127.0.0.1"

Definition at line 42 of file sensor.py.

◆ DEFAULT_IS_CUPS_SERVER

bool homeassistant.components.cups.sensor.DEFAULT_IS_CUPS_SERVER = True

Definition at line 44 of file sensor.py.

◆ DEFAULT_PORT

int homeassistant.components.cups.sensor.DEFAULT_PORT = 631

Definition at line 43 of file sensor.py.

◆ ICON_MARKER

string homeassistant.components.cups.sensor.ICON_MARKER = "mdi:water"

Definition at line 47 of file sensor.py.

◆ ICON_PRINTER

string homeassistant.components.cups.sensor.ICON_PRINTER = "mdi:printer"

Definition at line 46 of file sensor.py.

◆ PLATFORM_SCHEMA

homeassistant.components.cups.sensor.PLATFORM_SCHEMA
Initial value:
1 = SENSOR_PLATFORM_SCHEMA.extend(
2  {
3  vol.Required(CONF_PRINTERS): vol.All(cv.ensure_list, [cv.string]),
4  vol.Optional(CONF_IS_CUPS_SERVER, default=DEFAULT_IS_CUPS_SERVER): cv.boolean,
5  vol.Optional(CONF_HOST, default=DEFAULT_HOST): cv.string,
6  vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port,
7  }
8 )

Definition at line 53 of file sensor.py.

◆ PRINTER_STATES

dictionary homeassistant.components.cups.sensor.PRINTER_STATES = {3: "idle", 4: "printing", 5: "stopped"}

Definition at line 51 of file sensor.py.

◆ SCAN_INTERVAL

homeassistant.components.cups.sensor.SCAN_INTERVAL = timedelta(minutes=1)

Definition at line 49 of file sensor.py.