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

add "Reset Totals" button #478

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anmar
Copy link

@anmar anmar commented Jan 29, 2025

Add a "Reset Totals" so we can reset the counters from home assistant.

I use this so it's easier to keep track of how much filament and time I use after each spool change.

Copy link
Owner

@marcolivierarsenault marcolivierarsenault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add documentation about this button please.

Thank you

MoonrakerButtonDescription(
key="reset_totals",
name="Reset Totals",
press_fn=lambda button: button.coordinator.async_send_data(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very precise feature, and I think can lead to more error than use. Can you put it as disabled by default. (Folks will have to manually add it)

Suggested change
press_fn=lambda button: button.coordinator.async_send_data(
entity_registry_enabled_default=False,
press_fn=lambda button: button.coordinator.async_send_data(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants