Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ const acChargingEnabled = computed(
const DC_POWER_FALLBACK = 300; // entspricht dc_max_current-Default 435 A

const dcMaxPower = computed(
() => mqttStore.chargePointDcMaxPower(props.chargePointId).value ?? DC_POWER_FALLBACK,
() =>
mqttStore.chargePointDcMaxPower(props.chargePointId).value ??
DC_POWER_FALLBACK,
);

const dcMinPower = computed(() => -dcMaxPower.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ export interface ChartComponentRef {
}

export type Category =
| 'chargepoint'
| 'vehicle'
| 'battery'
| 'consumer'
| 'component';
'chargepoint' | 'vehicle' | 'battery' | 'consumer' | 'component';

export const CONSUMER_TOTAL_LABEL = 'Verbraucher ges.';

Expand Down
21 changes: 16 additions & 5 deletions packages/modules/web_themes/koala/source/src/stores/mqtt-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4573,11 +4573,22 @@ export const useMqttStore = defineStore('mqtt', () => {
counterIds: number[];
counterIdsWithChildren: number[];
}) => {
// a counter that only measures the components below it is hidden
const hidden = (id: number) =>
bucket.counterIdsWithChildren.includes(id) &&
Math.abs(Number(counterLocalPower.value('value', id) ?? 0)) <
COUNTER_OWN_SHARE_THRESHOLD;
const hidden = (id: number) => {
// a counter that only measures the components below it is hidden
if (
bucket.counterIdsWithChildren.includes(id) &&
Math.abs(Number(counterLocalPower.value('value', id) ?? 0)) <
COUNTER_OWN_SHARE_THRESHOLD
) {
return true;
}
// a counter that is linked to a consumer does not exist in the hierarchy
const counterIds = getObjectIds.value('counter');
if (!counterIds.includes(id)) {
return true;
}
return false;
};
return bucket.counterIds.filter((id) => !hidden(id));
};
return {
Expand Down
Loading