myio-js-library 0.1.148 → 0.1.150
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +21 -17
- package/dist/index.js +21 -17
- package/dist/myio-js-library.umd.js +21 -17
- package/dist/myio-js-library.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4771,7 +4771,8 @@ var DEFAULT_I18N = {
|
|
|
4771
4771
|
efficiency: "Efici\xEAncia",
|
|
4772
4772
|
temperature: "Temperatura",
|
|
4773
4773
|
operation_time: "Tempo em opera\xE7\xE3o",
|
|
4774
|
-
|
|
4774
|
+
last_telemetry: "\xDAlt. Telemetria",
|
|
4775
|
+
instantaneous_power: "Pot\xEAncia",
|
|
4775
4776
|
current_suffix: "Atual",
|
|
4776
4777
|
// Menu labels
|
|
4777
4778
|
menu_dashboard: "Dashboard",
|
|
@@ -5033,20 +5034,20 @@ function buildDOM(state) {
|
|
|
5033
5034
|
opTimeVal.className = "val";
|
|
5034
5035
|
opTimeMetric.appendChild(opTimeVal);
|
|
5035
5036
|
footer.appendChild(opTimeMetric);
|
|
5036
|
-
const
|
|
5037
|
-
|
|
5038
|
-
const
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
const
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
const
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
footer.appendChild(
|
|
5037
|
+
const powerMetric = document.createElement("div");
|
|
5038
|
+
powerMetric.className = "metric";
|
|
5039
|
+
const powerIcon = document.createElement("i");
|
|
5040
|
+
powerIcon.className = "ico ico-power";
|
|
5041
|
+
powerIcon.innerHTML = Icons.dot;
|
|
5042
|
+
powerMetric.appendChild(powerIcon);
|
|
5043
|
+
const powerLabel = document.createElement("div");
|
|
5044
|
+
powerLabel.className = "label";
|
|
5045
|
+
powerLabel.textContent = i18n.instantaneous_power || "Pot\xEAncia";
|
|
5046
|
+
powerMetric.appendChild(powerLabel);
|
|
5047
|
+
const powerVal = document.createElement("div");
|
|
5048
|
+
powerVal.className = "val";
|
|
5049
|
+
powerMetric.appendChild(powerVal);
|
|
5050
|
+
footer.appendChild(powerMetric);
|
|
5050
5051
|
root.appendChild(footer);
|
|
5051
5052
|
return root;
|
|
5052
5053
|
}
|
|
@@ -5098,8 +5099,11 @@ function paint(root, state) {
|
|
|
5098
5099
|
}
|
|
5099
5100
|
const opTimeVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(1) .val");
|
|
5100
5101
|
opTimeVal.textContent = entityObject.operationHours;
|
|
5101
|
-
const
|
|
5102
|
-
|
|
5102
|
+
const powerVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
|
|
5103
|
+
const instantPower = entityObject.instantaneousPower ?? entityObject.consumption_power ?? null;
|
|
5104
|
+
powerVal.textContent = instantPower !== null ? `${Number(instantPower).toFixed(2)} kW` : "-";
|
|
5105
|
+
const telemetryVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(3) .val");
|
|
5106
|
+
telemetryVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
|
|
5103
5107
|
}
|
|
5104
5108
|
function bindEvents(root, state, callbacks) {
|
|
5105
5109
|
const { entityObject } = state;
|
package/dist/index.js
CHANGED
|
@@ -4663,7 +4663,8 @@ var DEFAULT_I18N = {
|
|
|
4663
4663
|
efficiency: "Efici\xEAncia",
|
|
4664
4664
|
temperature: "Temperatura",
|
|
4665
4665
|
operation_time: "Tempo em opera\xE7\xE3o",
|
|
4666
|
-
|
|
4666
|
+
last_telemetry: "\xDAlt. Telemetria",
|
|
4667
|
+
instantaneous_power: "Pot\xEAncia",
|
|
4667
4668
|
current_suffix: "Atual",
|
|
4668
4669
|
// Menu labels
|
|
4669
4670
|
menu_dashboard: "Dashboard",
|
|
@@ -4925,20 +4926,20 @@ function buildDOM(state) {
|
|
|
4925
4926
|
opTimeVal.className = "val";
|
|
4926
4927
|
opTimeMetric.appendChild(opTimeVal);
|
|
4927
4928
|
footer.appendChild(opTimeMetric);
|
|
4928
|
-
const
|
|
4929
|
-
|
|
4930
|
-
const
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
const
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
const
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
footer.appendChild(
|
|
4929
|
+
const powerMetric = document.createElement("div");
|
|
4930
|
+
powerMetric.className = "metric";
|
|
4931
|
+
const powerIcon = document.createElement("i");
|
|
4932
|
+
powerIcon.className = "ico ico-power";
|
|
4933
|
+
powerIcon.innerHTML = Icons.dot;
|
|
4934
|
+
powerMetric.appendChild(powerIcon);
|
|
4935
|
+
const powerLabel = document.createElement("div");
|
|
4936
|
+
powerLabel.className = "label";
|
|
4937
|
+
powerLabel.textContent = i18n.instantaneous_power || "Pot\xEAncia";
|
|
4938
|
+
powerMetric.appendChild(powerLabel);
|
|
4939
|
+
const powerVal = document.createElement("div");
|
|
4940
|
+
powerVal.className = "val";
|
|
4941
|
+
powerMetric.appendChild(powerVal);
|
|
4942
|
+
footer.appendChild(powerMetric);
|
|
4942
4943
|
root.appendChild(footer);
|
|
4943
4944
|
return root;
|
|
4944
4945
|
}
|
|
@@ -4990,8 +4991,11 @@ function paint(root, state) {
|
|
|
4990
4991
|
}
|
|
4991
4992
|
const opTimeVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(1) .val");
|
|
4992
4993
|
opTimeVal.textContent = entityObject.operationHours;
|
|
4993
|
-
const
|
|
4994
|
-
|
|
4994
|
+
const powerVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
|
|
4995
|
+
const instantPower = entityObject.instantaneousPower ?? entityObject.consumption_power ?? null;
|
|
4996
|
+
powerVal.textContent = instantPower !== null ? `${Number(instantPower).toFixed(2)} kW` : "-";
|
|
4997
|
+
const telemetryVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(3) .val");
|
|
4998
|
+
telemetryVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
|
|
4995
4999
|
}
|
|
4996
5000
|
function bindEvents(root, state, callbacks) {
|
|
4997
5001
|
const { entityObject } = state;
|
|
@@ -4661,7 +4661,8 @@
|
|
|
4661
4661
|
efficiency: "Efici\xEAncia",
|
|
4662
4662
|
temperature: "Temperatura",
|
|
4663
4663
|
operation_time: "Tempo em opera\xE7\xE3o",
|
|
4664
|
-
|
|
4664
|
+
last_telemetry: "\xDAlt. Telemetria",
|
|
4665
|
+
instantaneous_power: "Pot\xEAncia",
|
|
4665
4666
|
current_suffix: "Atual",
|
|
4666
4667
|
// Menu labels
|
|
4667
4668
|
menu_dashboard: "Dashboard",
|
|
@@ -4923,20 +4924,20 @@
|
|
|
4923
4924
|
opTimeVal.className = "val";
|
|
4924
4925
|
opTimeMetric.appendChild(opTimeVal);
|
|
4925
4926
|
footer.appendChild(opTimeMetric);
|
|
4926
|
-
const
|
|
4927
|
-
|
|
4928
|
-
const
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
const
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
const
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
footer.appendChild(
|
|
4927
|
+
const powerMetric = document.createElement("div");
|
|
4928
|
+
powerMetric.className = "metric";
|
|
4929
|
+
const powerIcon = document.createElement("i");
|
|
4930
|
+
powerIcon.className = "ico ico-power";
|
|
4931
|
+
powerIcon.innerHTML = Icons.dot;
|
|
4932
|
+
powerMetric.appendChild(powerIcon);
|
|
4933
|
+
const powerLabel = document.createElement("div");
|
|
4934
|
+
powerLabel.className = "label";
|
|
4935
|
+
powerLabel.textContent = i18n.instantaneous_power || "Pot\xEAncia";
|
|
4936
|
+
powerMetric.appendChild(powerLabel);
|
|
4937
|
+
const powerVal = document.createElement("div");
|
|
4938
|
+
powerVal.className = "val";
|
|
4939
|
+
powerMetric.appendChild(powerVal);
|
|
4940
|
+
footer.appendChild(powerMetric);
|
|
4940
4941
|
root.appendChild(footer);
|
|
4941
4942
|
return root;
|
|
4942
4943
|
}
|
|
@@ -4988,8 +4989,11 @@
|
|
|
4988
4989
|
}
|
|
4989
4990
|
const opTimeVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(1) .val");
|
|
4990
4991
|
opTimeVal.textContent = entityObject.operationHours;
|
|
4991
|
-
const
|
|
4992
|
-
|
|
4992
|
+
const powerVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
|
|
4993
|
+
const instantPower = entityObject.instantaneousPower ?? entityObject.consumption_power ?? null;
|
|
4994
|
+
powerVal.textContent = instantPower !== null ? `${Number(instantPower).toFixed(2)} kW` : "-";
|
|
4995
|
+
const telemetryVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(3) .val");
|
|
4996
|
+
telemetryVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
|
|
4993
4997
|
}
|
|
4994
4998
|
function bindEvents(root, state, callbacks) {
|
|
4995
4999
|
const { entityObject } = state;
|