Skip to content

Instantly share code, notes, and snippets.

@bbbenji
Last active April 29, 2024 16:22
Show Gist options
  • Save bbbenji/2c73261e7de41b05ac9a27947350f07f to your computer and use it in GitHub Desktop.
Save bbbenji/2c73261e7de41b05ac9a27947350f07f to your computer and use it in GitHub Desktop.
Bambu Lab X1C Home Assistant Automations
###
# Toggle an external light from the X1C screen
###
alias: Bambu Lab - Auto External Light
description: ""
trigger:
- platform: state
entity_id:
- light.x1c_chamber_light
from: null
to: null
condition: []
action:
- if:
- condition: state
entity_id: light.x1c_chamber_light
state: "off"
then:
- type: turn_off
device_id: 261e409ef28b9f0229f711502043c360
entity_id: d2da7e50c5f56e7fc2a97871b8d60da2
domain: light
else:
- type: turn_on
device_id: 261e409ef28b9f0229f711502043c360
entity_id: d2da7e50c5f56e7fc2a97871b8d60da2
domain: light
mode: single
###
# Turn off the internal X1C light when a print finishes
###
alias: Bambu Lab - Auto Light
description: ""
trigger:
- platform: device
device_id: 13aa093ba53438189c5fae22949b6d3a
domain: bambu_lab
type: event_print_finished
condition: []
action:
- type: turn_off
device_id: 13aa093ba53438189c5fae22949b6d3a
entity_id: 27f53cb2a12d920ef2b4ff3b0ed1e069
domain: light
mode: single
###
# Send notification when X1C encounters error
###
alias: X1C - Notifier
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.x1c_hms_errors
to: "on"
condition: []
action:
- device_id: c6a373237db261f85e3bccf246c50567
domain: mobile_app
type: notify
title: >
X1C issue detected - ({{ state_attr('binary_sensor.x1c_hms_errors', '1-Severity') }})
message: >-
{{ state_attr('binary_sensor.x1c_hms_errors', '1-Error') }}
data:
actions:
- action: "URI"
title: "See possible solutions on Bambu Lab Wiki"
uri: >
{{ state_attr('binary_sensor.x1c_hms_errors', '1-Wiki') }}
mode: single
@burkben1
Copy link

burkben1 commented Jan 5, 2024

Yes I use the app, but I did not think of selecting it from the device list from the visual editor, was updating it from the yaml editor !
Should work, waiting for an error to be sure ^^
Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment