Füge neue Dateien für die Bambu-Druckereinstellungen und die Initialisierung hinzu
This commit is contained in:
parent
fd9ce76275
commit
c5c6ed037e
28
__init__.py
Normal file
28
__init__.py
Normal file
@ -0,0 +1,28 @@
|
||||
def get_settings_defaults(self):
|
||||
return {
|
||||
# ...existing code...
|
||||
|
||||
# Add option to disable camera functionality
|
||||
"disable_camera": False,
|
||||
|
||||
# ...existing code...
|
||||
}
|
||||
|
||||
# ...existing code...
|
||||
|
||||
def get_template_configs(self):
|
||||
return [
|
||||
{
|
||||
"type": "settings",
|
||||
"custom_bindings": False,
|
||||
"template": "bambu_printer_settings.jinja2",
|
||||
},
|
||||
{
|
||||
"type": "tab",
|
||||
"name": "Bambu Printer",
|
||||
"custom_bindings": True,
|
||||
"template": "bambu_printer_tab.jinja2",
|
||||
},
|
||||
]
|
||||
|
||||
# ...existing code...
|
17
templates/bambu_printer_settings.jinja2
Normal file
17
templates/bambu_printer_settings.jinja2
Normal file
@ -0,0 +1,17 @@
|
||||
<div class="control-group">
|
||||
<label class="control-label">{{ _('Connection Options') }}</label>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.bambu_printer.use_mqtt_bridge"> {{ _('Use MQTT Bridge') }}
|
||||
<span class="help-block">
|
||||
{{ _('Connect via a MQTT broker that bridges communications from the printer. Useful for connecting to a printer on a different network.') }}
|
||||
</span>
|
||||
</label>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" data-bind="checked: settings.plugins.bambu_printer.disable_camera"> {{ _('Disable Camera Functionality') }}
|
||||
<span class="help-block">
|
||||
{{ _('Disable camera streaming and image capture to avoid connection errors. Enable this if you see frequent connection refused errors in the logs.') }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user