Skip to content

Commit

Permalink
fix bug introduced in last version preventing addition of new devices
Browse files Browse the repository at this point in the history
  • Loading branch information
jneilliii committed Apr 10, 2021
1 parent 93b083b commit 5876ba3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion octoprint_tasmota/static/js/tasmota.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ $(function() {
'event_on_error':ko.observable(false),
'event_on_disconnect':ko.observable(false),
'event_on_upload':ko.observable(false),
'event_on_connecting':ko.observable(false)});
'event_on_connecting':ko.observable(false),
'is_led':ko.observable(false),
'brightness':ko.observable(50)});
self.settings.settings.plugins.tasmota.arrSmartplugs.push(self.selectedPlug());
$("#TasmotaEditor").modal("show");
}
Expand Down
2 changes: 1 addition & 1 deletion octoprint_tasmota/templates/tasmota_settings.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
<td><div class="controls"><label class="control-label">{{ _('Off Color') }}</label><input type="color" class="input input-small" data-bind="value: off_color" /></div></td>
<td><div class="controls"><label class="control-label">{{ _('Unknown Color') }}</label><input type="color" class="input input-small" data-bind="value: unknown_color" /></div></td>
<td><div class="controls"><label class="control-label">{{ _('Icon Class') }}</label><input type="text" class="input-block-level" data-bind="value: icon, iconpicker: icon,iconpickerOptions: {hideOnSelect: true, collision: true}" /></div></td>
<td><div class="controls"><label class="control-label"><input type="checkbox" data-bind="checked: is_led" title="Is an LED or WS2812 type device connected." /> {{ _('LED') }}</label><div class="input-append"><input type="number" min="1" max="100" class="input-small" data-bind="value: brightness, visible: is_led" /><span class="add-on">%</span></div></div></td>
<td><div class="controls"><label class="control-label"><input type="checkbox" data-bind="checked: is_led" title="Is an LED or WS2812 type device connected." /> {{ _('LED') }}</label><div class="input-append" data-bind="visible: is_led"><input type="number" min="1" max="100" class="input-small" data-bind="value: brightness" /><span class="add-on">%</span></div></div></td>
<td><div class="controls"><label class="control-label">{{ _('Sensor Identifier') }}</label><input type="text" class="input-block-level" data-bind="value: sensor_identifier" /></div></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "OctoPrint-Tasmota"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "1.0.2"
plugin_version = "1.0.3"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit 5876ba3

Please sign in to comment.