Skip to content

Instantly share code, notes, and snippets.

@bbbenji
Last active April 29, 2024 16:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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 3, 2024

Maybe I missed it, but I'm unable to find my device id for the mobile app in order to receive notifications.
I've looked around on my parameters and on google but I can't find the answer either, but I'm sure I'm near.
I've already setup your dashboard for my P1S ( after I've replaced what was needed) and it's working great so far !
Thanks in advance !

@bbbenji
Copy link
Author

bbbenji commented Jan 3, 2024

@burkben1 do you have the official HA app installed on your phone and configured? My phone just shows up in the devices list and I can select it from there.

@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