Skip to content

Commit 63c0f49

Browse files
authored
fix wrong grouping of entities according to their unit_of_measurement. Fixes #268 (#271)
1 parent e919b97 commit 63c0f49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parse-config/defaults.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const defaultEntityOptional = {
4242
const internal = getFromConfig(`entities.${i}.internal`);
4343
if (!internal && !units.includes(unit)) units.push(unit);
4444
}
45-
const yaxis_idx = units.length;
45+
const yaxis_idx = units.indexOf(getFromConfig(`.unit_of_measurement`)) + 1;
4646
return "y" + (yaxis_idx === 1 ? "" : yaxis_idx);
4747
},
4848
};

0 commit comments

Comments
 (0)