Skip to main content

Home Assistant

The Home Assistant integration exposes all Bambu Lab printers as devices in Home Assistant via MQTT Discovery — automatically, without manual YAML configuration.

Go to: https://localhost:3443/#settings → the Integrations → Home Assistant tab

Prerequisites

  • Home Assistant running on the network
  • MQTT broker (Mosquitto) installed and configured in Home Assistant
  • 3DPrintForge and Home Assistant using the same MQTT broker

Enabling MQTT Discovery

  1. Go to Settings → Integrations → Home Assistant
  2. Fill in MQTT broker settings (if not already configured):
    • Broker address: e.g. 192.168.1.100
    • Port: 1883 (or 8883 for TLS)
    • Username and password: if required by the broker
  3. Enable MQTT Discovery
  4. Set Discovery prefix: default is homeassistant
  5. Click Save and enable

3DPrintForge now publishes discovery messages for all registered printers.

Devices in Home Assistant

After activation, a new device per printer appears in Home Assistant (Settings → Devices & Services → MQTT):

Sensors (read)

EntityUnitExample
sensor.printer_nozzle_temp°C220.5
sensor.printer_bed_temp°C60.1
sensor.printer_chamber_temp°C34.2
sensor.printer_progress%47
sensor.printer_remaining_timemin83
sensor.printer_filament_usedg23.4
sensor.printer_statustextprinting
sensor.printer_current_filetextbenchy.3mf
sensor.printer_layertext124 / 280

Binary sensors

EntityState
binary_sensor.printer_printingon / off
binary_sensor.printer_erroron / off
binary_sensor.printer_door_openon / off (X1C)

Buttons (actions)

EntityAction
button.printer_pausePause ongoing print
button.printer_resumeResume paused print
button.printer_stopStop ongoing print
Stop button

The stop button in Home Assistant cancels the print without a confirmation dialog. Use with caution in automations.

Automation examples

Notify on phone when print is complete

automation:
- alias: "Bambu - Print complete"
trigger:
- platform: state
entity_id: binary_sensor.printer_printing
from: "on"
to: "off"
condition:
- condition: state
entity_id: sensor.printer_status
state: "finish"
action:
- service: notify.mobile_app_my_phone
data:
title: "Print complete!"
message: "{{ states('sensor.printer_current_file') }} is done."

Dim lights when print starts

automation:
- alias: "Bambu - Dim lights during printing"
trigger:
- platform: state
entity_id: binary_sensor.printer_printing
to: "on"
action:
- service: light.turn_on
target:
entity_id: light.basement
data:
brightness_pct: 30

Energy monitoring

Combined with Energy monitoring, the following are also exposed:

  • sensor.printer_power_watts — instantaneous power
  • sensor.printer_energy_kwh — energy consumption for the ongoing print

See Energy monitoring for smart plug setup.