Skip to content

Commit b6bcb40

Browse files
committed
fix telegram info
fix telegram info
1 parent 834cb8e commit b6bcb40

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

MMM-TuyaSL.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ Module.register("MMM-TuyaSL", {
4040
var text = "*" + this.translate("TXT_TUYASL") + "*\n";
4141
if (this.devices) {
4242
for (var i = 0; i < this.devices.length; i++) {
43-
text += "*" + this.devices[i].alias + "*: ";
44-
text += "`" + (this.devices[i].on_off == 1 ? this.translate("TXT_TUYASL_ON") : this.translate("TXT_TUYASL_OFF")) + "`\n";
43+
if (this.devices[i].type != 'scene') {
44+
text += "*" + this.devices[i].alias + "*: ";
45+
text += "`" + (this.devices[i].online ? this.translate("TXT_TUYASL_ONLINE") : this.translate("TXT_TUYASL_OFFLINE")) + "/" + (this.devices[i].on_off ? this.translate("TXT_TUYASL_ON") : this.translate("TXT_TUYASL_OFF")) + "`\n";
46+
}
4547
}
4648
}
4749
else {

translations/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"NO_DATA": "No data",
44
"TXT_TUYASL": "Tuya STATUS",
55
"TXT_TUYASL_DESC": " all status of installed IoT/smart-home devices on Tuya IoT-Platform",
6+
"TXT_TUYASL_ONLINE": "ONLINE",
7+
"TXT_TUYASL_OFFLINE": "OFFLINE",
68
"TXT_TUYASL_ON": "ON",
79
"TXT_TUYASL_OFF": "OFF"
810
}

translations/id.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"NO_DATA": "Data tidak tersedia",
44
"TXT_TUYASL": "STATUS Tuya",
55
"TXT_TUYASL_DESC": " menampilkan semua status peralatan IoT/smart-home berbasis Tuya IoT-Platform",
6+
"TXT_TUYASL_ONLINE": "DARING",
7+
"TXT_TUYASL_OFFLINE": "LURING",
68
"TXT_TUYASL_ON": "NYALA",
79
"TXT_TUYASL_OFF": "PADAM"
810
}

0 commit comments

Comments
 (0)