diff --git a/package-lock.json b/package-lock.json
index 0674185..4ec8169 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10993,7 +10993,7 @@
},
"node_modules/protobuf-ts": {
"version": "1.0.0",
- "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#71953bd261f03f03c40ad5c41b508290fa91f49b",
+ "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#71512b1821dbe01eebe5ebb9539ce5a6a8f865a7",
"dependencies": {
"protobufjs": "^6.8.8"
}
diff --git a/src/common/StatusSen5x.tsx b/src/common/StatusSen5x.tsx
index efcb53f..262f595 100644
--- a/src/common/StatusSen5x.tsx
+++ b/src/common/StatusSen5x.tsx
@@ -34,6 +34,7 @@ const useStyles = makeStyles((theme: Theme) => {
transition: 'opacity 0.5s ease, transform 0.5s ease',
position: 'absolute',
width: '100%',
+ overflow: "hidden",
// height: '100%',
},
active: {
@@ -50,8 +51,8 @@ export default function StatusPlenum(props: Props) {
const { device } = props;
const classes = useStyles()
- const colors = or(device.status.plenum?.overlays.map(overlay => overlay.color), []);
- const messages = or(device.status.plenum?.overlays.map(overlay => overlay.message), []);
+ const colors = or(device.status.sen5x?.overlays.map(overlay => overlay.color), []);
+ const messages = or(device.status.sen5x?.overlays.map(overlay => overlay.message), []);
const [color, setColor] = useState(colors.length > 0 ? colors[0] : "");
const [, setColorIndex] = useState(0)
@@ -63,7 +64,7 @@ export default function StatusPlenum(props: Props) {
setColor(colors[newIndex]); // Use the new index here
return newIndex;
});
- }, 5000);
+ }, 7500);
return () => clearInterval(interval);
}, []);
@@ -116,89 +117,75 @@ export default function StatusPlenum(props: Props) {
return (
- {/* */}
-
-
-
-
- {device.status.sen5x?.temperature.toFixed(1)}°C
-
-
-
-
- {device.status.sen5x?.humidity.toFixed(1)}%
-
-
+
+
+
+
+ {device.status.sen5x?.temperature.toFixed(1)}°C
+
-
-
-
-
- {device.status.sen5x?.dust_1ug.toFixed(1)}ug/m3
-
-
-
-
- {device.status.sen5x?.dust_2ug.toFixed(1)}ug/m3
-
-
+
+
+ {device.status.sen5x?.humidity.toFixed(1)}%
+
-
-
-
-
- {device.status.sen5x?.dust_4ug.toFixed(1)}ug/m3
-
-
-
-
- {device.status.sen5x?.dust_10ug.toFixed(1)}ug/m3
-
-
+
+
+
+
+
+ {device.status.sen5x?.dust1ug.toFixed(1)}ug/m3
+
-
-
-
-
- {device.status.sen5x?.voc.toFixed(1)}%
-
-
-
-
- {device.status.sen5x?.nox.toFixed(1)}%
-
-
+
+
+ {device.status.sen5x?.dust2ug.toFixed(1)}ug/m3
+
-
- {/*
-
- {device.status.sen5x?.temperature.toFixed(1)}°C
-
+
+
+
+ {device.status.sen5x?.dust4ug.toFixed(1)}ug/m3
+
+
+
+
+ {device.status.sen5x?.dust10ug.toFixed(1)}ug/m3
+
+
-
-
- {device.status.sen5x?.humidity.toFixed(1)}%
-
- */}
- {/* */}
+
+
+
+
+ {device.status.sen5x?.voc.toFixed(1)}%
+
+
+
+
+ {device.status.sen5x?.nox.toFixed(1)}%
+
+
+
+
)
diff --git a/src/component/ComponentSettings.tsx b/src/component/ComponentSettings.tsx
index ac68259..d762ee3 100644
--- a/src/component/ComponentSettings.tsx
+++ b/src/component/ComponentSettings.tsx
@@ -307,11 +307,11 @@ export default function ComponentSettings(props: Props) {
if (cableID > 0) component.settings.addressType = cableID + 8;
componentAPI
.add(device.id(), component.settings, as)
- .then((response: any) => {
+ .then((_response: any) => {
success(component.name() + " was successfully added!");
refresh();
})
- .catch((err: any) => {
+ .catch((_err: any) => {
error("Error occured while adding " + component.name() + ".");
})
.finally(() => close());
@@ -321,21 +321,21 @@ export default function ComponentSettings(props: Props) {
const component = formComponent;
componentAPI
.update(device.id(), component.settings, getContextKeys(), getContextTypes(), as)
- .then((response: any) => {
+ .then((_response: any) => {
success(component.name() + " was successfully updated!");
let updatedPrefs = pond.DeviceComponentPreferences.create();
updatedPrefs.excludedNodes = excludedNodes;
deviceAPI
.updateComponentPreferences(device.id(), component.key(), updatedPrefs, undefined, undefined, as)
- .then(resp => {
+ .then(_resp => {
console.log("Preferences updated");
})
- .catch(err => {
+ .catch(_err => {
console.log("Preferences failed to update");
});
refresh();
})
- .catch((err: any) => {
+ .catch((_err: any) => {
error("Error occured while updating " + component.name() + ".");
})
.finally(() => {
@@ -346,7 +346,7 @@ export default function ComponentSettings(props: Props) {
const removeComponent = () => {
componentAPI
.remove(device.id(), formComponent.key(), getContextKeys(), getContextTypes(), as)
- .then((response: any) => {
+ .then((_response: any) => {
success(formComponent.name() + " was successfully removed!");
refresh();
})
@@ -826,16 +826,16 @@ export default function ComponentSettings(props: Props) {
Back
) : (
- setRemoveDialogOpen(true)}>Delete
+ setRemoveDialogOpen(true)}>Delete
)}
{mode === "add" ? (
{activeStep === steps.length - 1 ? (