This is a custom integration for Home Assistant to interface with the XTool laser engraver.
- Displays the current status of the XTool (e.g., "Running", "Idle", "Sleep").
- Can be integrated into Home Assistant for monitoring and automation.
- Supports multiple machines
- Add as this repo as a custom repo in HACS
- Search for Xtool in HACS and install
- Download or clone this repository.
- Place the
xtool
folder in thecustom_components
directory of your Home Assistant installation.
Add the following to your configuration.yaml
:
sensor:
- platform: xtool
name: p2_laser
ip_address: "xxx.xxx.xxx.xxx" # Replace with the IP address of your XTool
- platform: xtool
name: f1u_laser
ip_address: "xxx.xxx.xxx.xxx" # Replace with the IP address of your XTool
Once the integration is installed and configured, a sensor will be created in Home Assistant displaying the current status of the XTool. The status values can include:
- Running: The XTool is currently running.
- Done: The work is completed.
- Idle: The XTool is idle.
- Sleep: The XTool is in sleep mode.
- Unknown: The status could not be retrieved.
You can use these sensor states in automations to monitor and control the XTool's activities.
alias: P2 Exhaust Fan
description: "Turns the exhaust fan on and off"
triggers:
- trigger: state
entity_id:
- sensor.p2_laser_status
from: null
conditions: []
actions:
- if:
- condition: state
entity_id: sensor.p2_laser_status
state: Running
then:
- type: turn_on
device_id: a3f5b6c7d8e9f0a1b2c3d4e5f6a7b8c9
entity_id: d4e5f6a7b8c9a3f5b6c7d8e9f0a1b2c3
domain: switch
else:
- type: turn_off
device_id: a3f5b6c7d8e9f0a1b2c3d4e5f6a7b8c9
entity_id: f0a1b2c3d4e5f6a7b8c9a3f5b6c7d8e9
domain: switch
mode: single
If you enjoy my projects or find them useful, consider supporting me on Ko-fi!