diff --git a/static/js/components/sensor-dashboard.js b/static/js/components/sensor-dashboard.js
index fa015fb..16e49cc 100644
--- a/static/js/components/sensor-dashboard.js
+++ b/static/js/components/sensor-dashboard.js
@@ -77,7 +77,7 @@ const SensorDashboard = (function () {
return parts.map(p => `
-
${p.val}
+
${esc(String(p.val))}
${esc(p.unit)}
${p.label}
`).join('');
@@ -107,7 +107,6 @@ const SensorDashboard = (function () {
function buildCardHTML(msg, history, primaryColor) {
const age = formatAge(msg.timestamp);
const fresh = isRecent(msg.timestamp);
- const batOk = msg.battery === 'OK';
const batLow = msg.battery === 'LOW';
const sparkHTML = history.length > 0
? buildSparklineHTML(history, primaryColor || '#4aa3ff')
@@ -117,7 +116,7 @@ const SensorDashboard = (function () {
@@ -125,7 +124,7 @@ const SensorDashboard = (function () {
${sparkHTML}
`;
}