Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.octoprint Namespace Reference

Namespaces

 binary_sensor
 
 button
 
 camera
 
 config_flow
 
 const
 
 coordinator
 
 sensor
 

Functions

OctoprintClient async_get_client_for_service_call (HomeAssistant hass, ServiceCall call)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 
def ensure_valid_path (value)
 
def has_all_unique_names (value)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 BINARY_SENSOR_SCHEMA
 
list BINARY_SENSOR_TYPES
 
string CONF_BED = "bed"
 
string CONF_NUMBER_OF_TOOLS = "number_of_tools"
 
 CONFIG_SCHEMA
 
string DEFAULT_NAME = "OctoPrint"
 
list PLATFORMS = [Platform.BINARY_SENSOR, Platform.BUTTON, Platform.CAMERA, Platform.SENSOR]
 
 SENSOR_SCHEMA
 
list SENSOR_TYPES
 
 SERVICE_CONNECT_SCHEMA
 

Detailed Description

Support for monitoring OctoPrint 3D printers.

Function Documentation

◆ async_get_client_for_service_call()

OctoprintClient homeassistant.components.octoprint.async_get_client_for_service_call ( HomeAssistant  hass,
ServiceCall   call 
)
Get the client related to a service call (by device ID).

Definition at line 242 of file __init__.py.

◆ async_setup()

bool homeassistant.components.octoprint.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up the OctoPrint component.

Definition at line 141 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.octoprint.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up OctoPrint from a config entry.

Definition at line 166 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.octoprint.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload a config entry.

Definition at line 232 of file __init__.py.

◆ ensure_valid_path()

def homeassistant.components.octoprint.ensure_valid_path (   value)
Validate the path, ensuring it starts and ends with a /.

Definition at line 50 of file __init__.py.

◆ has_all_unique_names()

def homeassistant.components.octoprint.has_all_unique_names (   value)
Validate that printers have an unique name.

Definition at line 43 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.octoprint._LOGGER = logging.getLogger(__name__)
private

Definition at line 40 of file __init__.py.

◆ BINARY_SENSOR_SCHEMA

homeassistant.components.octoprint.BINARY_SENSOR_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(
4  CONF_MONITORED_CONDITIONS, default=list(BINARY_SENSOR_TYPES)
5  ): vol.All(cv.ensure_list, [vol.In(BINARY_SENSOR_TYPES)]),
6  vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
7  }
8 )

Definition at line 70 of file __init__.py.

◆ BINARY_SENSOR_TYPES

list homeassistant.components.octoprint.BINARY_SENSOR_TYPES
Initial value:
1 = [
2  "Printing",
3  "Printing Error",
4 ]

Definition at line 65 of file __init__.py.

◆ CONF_BED

string homeassistant.components.octoprint.CONF_BED = "bed"

Definition at line 63 of file __init__.py.

◆ CONF_NUMBER_OF_TOOLS

string homeassistant.components.octoprint.CONF_NUMBER_OF_TOOLS = "number_of_tools"

Definition at line 62 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.octoprint.CONFIG_SCHEMA

Definition at line 96 of file __init__.py.

◆ DEFAULT_NAME

string homeassistant.components.octoprint.DEFAULT_NAME = "OctoPrint"

Definition at line 61 of file __init__.py.

◆ PLATFORMS

list homeassistant.components.octoprint.PLATFORMS = [Platform.BINARY_SENSOR, Platform.BUTTON, Platform.CAMERA, Platform.SENSOR]

Definition at line 60 of file __init__.py.

◆ SENSOR_SCHEMA

homeassistant.components.octoprint.SENSOR_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_MONITORED_CONDITIONS, default=list(SENSOR_TYPES)): vol.All(
4  cv.ensure_list, [vol.In(SENSOR_TYPES)]
5  ),
6  vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
7  }
8 )

Definition at line 87 of file __init__.py.

◆ SENSOR_TYPES

list homeassistant.components.octoprint.SENSOR_TYPES
Initial value:
1 = [
2  "Temperatures",
3  "Current State",
4  "Job Percentage",
5  "Time Remaining",
6  "Time Elapsed",
7 ]

Definition at line 79 of file __init__.py.

◆ SERVICE_CONNECT_SCHEMA

homeassistant.components.octoprint.SERVICE_CONNECT_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(CONF_DEVICE_ID): cv.string,
4  vol.Optional(CONF_PROFILE_NAME): cv.string,
5  vol.Optional(CONF_PORT): cv.string,
6  vol.Optional(CONF_BAUDRATE): cv.positive_int,
7  }
8 )

Definition at line 131 of file __init__.py.