Skip to content

Commit

Permalink
Merge pull request #2185 from asgothian/NewHerdsmanTest
Browse files Browse the repository at this point in the history
- Zigbee-Herdsman to 20.2.0, including a breaking change for legacy handling
- Zigbee-Herdsman-Converters to 19.75.0, including a breaking change for legacy handling
- Extended filter option for device tiles on the adapter config and adapter tab
- Bump version to 1.10.6
  • Loading branch information
asgothian authored Sep 4, 2024
2 parents b9b1c4a + dce7684 commit 14664f4
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 7,788 deletions.
31 changes: 29 additions & 2 deletions admin/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ function getCard(dev) {
</div>`;
return card;
}

/*
function openReval(e, id, name){
const $card = $(e.target).closest('.card');
Expand Down Expand Up @@ -919,6 +918,10 @@ function load(settings, onChange) {
$('#device-order-btn').text($(this).text());
doSort();
});
$('#device-filter a').click(function () {
$('#device-filter-btn').text($(this).text());
doFilter();
});
});

const text = $('#pairing').attr('data-tooltip');
Expand Down Expand Up @@ -2751,7 +2754,8 @@ function doFilter(inputText) {
const lang = systemLang || 'en';
const searchText = inputText || $('#device-search').val();
const roomFilter = $('#room-filter-btn').text().toLowerCase();
if (searchText || roomFilter !== 'all') {
const deviceFilter = $('#device-filter-btn').text().toLowerCase();
if (searchText || roomFilter !== 'all' || deviceFilter != 'all') {
shuffleInstance.filter(function (element, shuffle) {
const devId = element.getAttribute('id');
const dev = getDeviceByID(devId);
Expand All @@ -2775,6 +2779,29 @@ function doFilter(inputText) {
valid = false;
}
}
if (valid && dev && deviceFilter !== 'all') {
switch (deviceFilter) {
case 'connected':
valid = (dev.link_quality > 0) && !dev.common.deactivated;
break;
case 'disconnected':
valid = (dev.link_quality <= 0) && !dev.common.deactivated;
break;
case 'deactivated':
valid = dev.common.deactivated;
break;
case 'router':
valid = dev.battery == null;
break;
case 'enddevice':
valid = dev.battery && dev.battery>0;
break;
case 'group':
valid = (dev.common.type == 'group');
break;
default: valid = true;
}
}
return valid;
});
} else {
Expand Down
Binary file modified admin/img/group_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/img/group_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/img/group_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/img/group_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/img/group_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/img/group_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/img/group_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions admin/tab_m.html
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ <h5 class="translate center-align">Zigbee adapter</h5>
<a id="device-order-btn" class="dropdown-trigger btn" href="#" data-target="device-order">Default</a>
<ul id="device-order" class="dropdown-content" tabindex="0">
<li class="device-order-item" data-type="a-z" tabindex="0"><a class="translate" data-lang="A-Z">A-Z</a></li>
<!--<li class="device-order-item" data-type="kind" tabindex="0"><a class="translate" data-lang="Kind">Kind</a></li>-->
<!--<li class="device-order-item" data-type="status" tabindex="0"><a class="translate" data-lang="Status">Status</a></li>-->
<li class="device-order-item" data-type="default" tabindex="0"><a class="translate" data-lang="Default">Default</a></li>
</ul>
</div>
Expand All @@ -497,6 +499,21 @@ <h5 class="translate center-align">Zigbee adapter</h5>
</ul>
</div>
</li>
<li>
<div class="col input-field" style="line-height: 24px;">
<i class="material-icons left" style="line-height: 24px; margin-top: 5px;">filter_list</i>
<a id="device-filter-btn" class="dropdown-trigger btn" href="#" data-target="device-filter">All</a>
<ul id="device-filter" class="dropdown-content" tabindex="0">
<li class="device-filter-item" data-type="connected" tabindex="0"><a class="translate" data-lang="Connected">Connected</a></li>
<li class="device-filter-item" data-type="disconnected" tabindex="0"><a class="translate" data-lang="Disconnected">Disconnected</a></li>
<li class="device-filter-item" data-type="deactivated" tabindex="0"><a class="translate" data-lang="Deactivated">Deactivated</a></li>
<li class="device-filter-item" data-type="router" tabindex="0"><a class="translate" data-lang="Router">Router</a></li>
<li class="device-filter-item" data-type="enddevice" tabindex="0"><a class="translate" data-lang="Enddevice">End Device</a></li>
<li class="device-filter-item" data-type="group" tabindex="0"><a class="translate" data-lang="Group">Group</a></li>
<li class="device-filter-item" data-type="all" tabindex="0"><a class="all" data-lang="All">All</a></li>
</ul>
</div>
</li>
</ul>
</nav>
</div>
Expand Down
16 changes: 15 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
{
"common": {
"name": "zigbee",
"version": "1.10.5",
"version": "1.10.6",
"news": {
"1.10.6": {
"en": "core update\ndependency update",
"de": "kern-update\naktualisierung der abhängigkeit",
"ru": "обновление\nобновление",
"pt": "atualização do núcleo\natualização de dependência",
"nl": "kernupdate\nafhankelijkheidsupdate",
"fr": "mise à jour de base\nmise à jour de la dépendance",
"it": "aggiornamento del core\naggiornamento della dipendenza",
"es": "actualización básica\nactualización de la dependencia",
"pl": "podstawowa aktualizacja\naktualizacja zależności",
"uk": "оновлення ядра\nоновлення залежності",
"zh-cn": "核心更新\n依赖性更新"
},

"1.10.5": {
"en": "icon ota device update\nicon fix",
"de": "icon ota device update\nsymbol fix",
Expand Down
Loading

0 comments on commit 14664f4

Please sign in to comment.