Skip to content

Commit

Permalink
fix: preferred scale not found when set as string (#7286)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone authored Oct 16, 2024
1 parent 70f3550 commit 4d1bc3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cc/src/cc/MultilevelSensorCC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function getPreferredSensorScale(
if (typeof preferred === "string") {
for (const [key, scale] of Object.entries(sensor.scales)) {
if (scale.label === preferred || scale.unit === preferred) {
preferred = key;
preferred = parseInt(key, 10);
break;
}
}
Expand Down

0 comments on commit 4d1bc3e

Please sign in to comment.