Skip to content

Commit

Permalink
Merge pull request #829 from onkelandy/xiaomi_vac
Browse files Browse the repository at this point in the history
xiaomi_vac plugin: remove webif pagelength init from web interface
  • Loading branch information
onkelandy authored Sep 24, 2023
2 parents 0d50ed4 + 45f88c4 commit 6ea1914
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
3 changes: 2 additions & 1 deletion xiaomi_vac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@

class Robvac(SmartPlugin):
ALLOW_MULTIINSTANCE = False
PLUGIN_VERSION = "1.2.3"
PLUGIN_VERSION = "1.2.4"

def __init__(self, smarthome):
super().__init__()
self._ip = self.get_parameter_value("ip")
self._token = self.get_parameter_value("token")
self._cycle = self.get_parameter_value("read_cycle")
Expand Down
2 changes: 1 addition & 1 deletion xiaomi_vac/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugin:
In newer Valetudo versions you find the token in the log as LocalSecret. Convert the token at https://gchq.github.io/CyberChef/#recipe=To_Hex to 32 characters.
'
support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1453597-support-thread-f%C3%BCr-xiaomi-saugroboter-plugin
version: 1.2.3 # Plugin version
version: 1.2.4 # Plugin version
sh_minversion: 1.4 # minimum shNG version to use this plugin
multi_instance: False # plugin supports multi instance
classname: Robvac # class containing the plugin
Expand Down
13 changes: 1 addition & 12 deletions xiaomi_vac/webif/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,8 @@
<script>
$(document).ready( function () {
$(window).trigger('datatables_defaults');
/* get pagelength from http module or plugin. */
{% if webif_pagelength is defined %}webif_pagelength = {{ webif_pagelength|int }};{% endif %}
if (isNaN(parseFloat(webif_pagelength)) || webif_pagelength == 0) {
resize = true;
webif_pagelength = -1;
}
else {
resize = false;
}
try {
table = $('#maintable').DataTable( {
pageLength: webif_pagelength,
pageResize: resize});
table = $('#maintable').DataTable( {});
}
catch (e) {
console.log("Datatable JS not loaded, showing standard table without reorder option " +e);
Expand Down

0 comments on commit 6ea1914

Please sign in to comment.