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 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
- updated: "Atualizado",
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 updatedMetric = document.createElement("div");
5037
- updatedMetric.className = "metric";
5038
- const updatedIcon = document.createElement("i");
5039
- updatedIcon.className = "ico ico-sync";
5040
- updatedIcon.innerHTML = Icons.dot;
5041
- updatedMetric.appendChild(updatedIcon);
5042
- const updatedLabel = document.createElement("div");
5043
- updatedLabel.className = "label";
5044
- updatedLabel.textContent = i18n.updated;
5045
- updatedMetric.appendChild(updatedLabel);
5046
- const updatedVal = document.createElement("div");
5047
- updatedVal.className = "val";
5048
- updatedMetric.appendChild(updatedVal);
5049
- footer.appendChild(updatedMetric);
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 updatedVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
5102
- updatedVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
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
- updated: "Atualizado",
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 updatedMetric = document.createElement("div");
4929
- updatedMetric.className = "metric";
4930
- const updatedIcon = document.createElement("i");
4931
- updatedIcon.className = "ico ico-sync";
4932
- updatedIcon.innerHTML = Icons.dot;
4933
- updatedMetric.appendChild(updatedIcon);
4934
- const updatedLabel = document.createElement("div");
4935
- updatedLabel.className = "label";
4936
- updatedLabel.textContent = i18n.updated;
4937
- updatedMetric.appendChild(updatedLabel);
4938
- const updatedVal = document.createElement("div");
4939
- updatedVal.className = "val";
4940
- updatedMetric.appendChild(updatedVal);
4941
- footer.appendChild(updatedMetric);
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 updatedVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
4994
- updatedVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
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
- updated: "Atualizado",
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 updatedMetric = document.createElement("div");
4927
- updatedMetric.className = "metric";
4928
- const updatedIcon = document.createElement("i");
4929
- updatedIcon.className = "ico ico-sync";
4930
- updatedIcon.innerHTML = Icons.dot;
4931
- updatedMetric.appendChild(updatedIcon);
4932
- const updatedLabel = document.createElement("div");
4933
- updatedLabel.className = "label";
4934
- updatedLabel.textContent = i18n.updated;
4935
- updatedMetric.appendChild(updatedLabel);
4936
- const updatedVal = document.createElement("div");
4937
- updatedVal.className = "val";
4938
- updatedMetric.appendChild(updatedVal);
4939
- footer.appendChild(updatedMetric);
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 updatedVal = root.querySelector(".myio-ho-card__footer .metric:nth-child(2) .val");
4992
- updatedVal.textContent = formatUpdateDate(entityObject.lastActivityTime);
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;