Skip to content

Commit

Permalink
Fixed devices sorting.
Browse files Browse the repository at this point in the history
  • Loading branch information
XHunter74 committed Apr 24, 2024
1 parent 517dad8 commit 40f7d82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ class GreeHvac extends utils.Adapter {
const result = {};
try {
let devices = await this.collectDeviceInfo();
devices = devices.sort((a, b) => (a.last_nom > b.last_nom) ? 1 : ((b.last_nom > a.last_nom) ? -1 : 0));
devices = devices.sort((a, b) => (a.name > b.name) ? 1 : ((b.name > a.name) ? -1 : 0));
result.result = devices;
} catch (error) {
result.error = error.message;
Expand Down

0 comments on commit 40f7d82

Please sign in to comment.