UI: Fixed updated show value and toltip and liquid level widget

This commit is contained in:
Vladyslav_Prykhodko 2023-11-09 17:01:14 +02:00
parent c021c64eab
commit e8bcf292ee

View File

@ -541,13 +541,13 @@ export class LiquidLevelWidgetComponent implements OnInit {
</div>`; </div>`;
} }
private convertInputData(value: number): number { private convertInputData(value: any): number {
if (this.settings.datasourceUnits !== CapacityUnits.percent) { if (this.settings.datasourceUnits !== CapacityUnits.percent) {
return (convertLiters(value, this.settings.datasourceUnits, ConversionType.to) / return (convertLiters(Number(value), this.settings.datasourceUnits, ConversionType.to) /
convertLiters(this.volume, this.settings.volumeUnits, ConversionType.to)) * 100; convertLiters(this.volume, this.settings.volumeUnits, ConversionType.to)) * 100;
} }
return value; return Number(value);
} }
private convertOutputData(value: number): number { private convertOutputData(value: number): number {