Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error on adding buttons #8

Open
wants to merge 1 commit into
base: Next-release
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions creality_control/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ async def async_setup_entry(hass, entry, async_add_entities):
# Check the printer type to populate the appropriate buttons
if entry.data.get("printer_type") == "wifi_box":
buttons.extend([
CrealityControlButton(coordinator, f"{coordinator.config['model']} Pause Print", "PRINT_PAUSE"),
CrealityControlButton(coordinator, f"{coordinator.config['model']} Resume Print", "PRINT_RESUME"),
CrealityControlButton(coordinator, f"{coordinator.config['model']} Stop Print", "PRINT_STOP"),
CrealityControlButton(coordinator, f"Pause Print", "PRINT_PAUSE"),
CrealityControlButton(coordinator, f"Resume Print", "PRINT_RESUME"),
CrealityControlButton(coordinator, f"Stop Print", "PRINT_STOP"),
])
else: # Default to your original Halot resin printer buttons
buttons.extend([
Expand Down