${localize('common.total', '', '', this.config.language)}
- ${stateValue} mm
+ ${stateValue} ${unitOfMeasurement}
- ${this._showHourlyRate(hourlyRateEntityState, hourlyRateStateValue)}
+ ${this._showHourlyRate(hourlyRateEntityState, hourlyRateStateValue, unitOfMeasurement)}
@@ -156,11 +163,11 @@ export class RainGaugeCard extends LitElement {
`;
}
- private _showHourlyRate(hourlyRateEntityState: any | undefined, hourlyRateStateValue: number): TemplateResult | void {
+ private _showHourlyRate(hourlyRateEntityState: any | undefined, hourlyRateStateValue: number, unitOfMeasurement: string): TemplateResult | void {
if (hourlyRateEntityState === undefined) return
return html`
${localize('common.rate', '', '', this.config.language)}
- ${hourlyRateStateValue} mm/h
+ ${hourlyRateStateValue} ${unitOfMeasurement}/h
`
}
diff --git a/src/types.ts b/src/types.ts
index 68b5010..abe2606 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -16,6 +16,7 @@ export interface RainGaugeCardConfig extends LovelaceCardConfig {
test_gui?: boolean;
entity?: string;
language?: string;
+ is_imperial?: boolean;
hourly_rate_entity?: string;
tap_action?: ActionConfig;
hold_action?: ActionConfig;