Merge pull request #9595 from vvlladd28/bug/liqued-level/updated-value-and-tooltip

Fixed updated show value and toltip in liquid level widget
This commit is contained in:
Igor Kulikov 2023-11-09 17:29:26 +02:00 committed by GitHub
commit 11e582abef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -541,13 +541,13 @@ export class LiquidLevelWidgetComponent implements OnInit {
</div>`;
}
private convertInputData(value: number): number {
private convertInputData(value: any): number {
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;
}
return value;
return Number(value);
}
private convertOutputData(value: number): number {