Skip to content

Commit

Permalink
Adapt to energy sensors supporting GJ (home-assistant#14181)
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery committed Oct 25, 2022
1 parent f1139e0 commit 57fb8f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/data/recorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export interface StatisticsValidationResultUnitsChanged {
}

export interface StatisticsUnitConfiguration {
energy?: "Wh" | "kWh" | "MWh";
energy?: "Wh" | "kWh" | "MWh" | "GJ";
power?: "W" | "kW";
pressure?:
| "Pa"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ export class DialogEnergyGasSettings
const pickableUnit =
this._pickableUnit ||
(this._params.allowedGasUnitClass === undefined
? "ft³, m³, Wh, kWh or MWh"
? "ft³, m³, Wh, kWh, MWh or GJ"
: this._params.allowedGasUnitClass === "energy"
? "Wh, kWh or MWh"
? "Wh, kWh, MWh or GJ"
: "ft³ or m³");

const externalSource =
Expand Down
10 changes: 5 additions & 5 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@
"cost_number": "Use a static price",
"cost_number_input": "Price per {unit}",
"gas_usage": "Gas usage",
"m3_or_kWh": "ft³, m³, Wh, kWh or MWh"
"m3_or_kWh": "ft³, m³, Wh, kWh, MWh or GJ"
}
},
"device_consumption": {
Expand Down Expand Up @@ -1538,19 +1538,19 @@
},
"entity_unexpected_unit_energy": {
"title": "Unexpected unit of measurement",
"description": "The following entities do not have the expected units of measurement 'Wh', 'kWh' or 'MWh':"
"description": "The following entities do not have the expected units of measurement 'Wh', 'kWh', 'MWh' or 'GJ':"
},
"entity_unexpected_unit_gas": {
"title": "Unexpected unit of measurement",
"description": "The following entities do not have the expected units of measurement 'Wh', 'kWh' or 'MWh' for an energy sensor or 'm³' or 'ft³' for a gas sensor:"
"description": "The following entities do not have the expected units of measurement 'Wh', 'kWh', 'MWh' or 'GJ' for an energy sensor or 'm³' or 'ft³' for a gas sensor:"
},
"entity_unexpected_unit_energy_price": {
"title": "Unexpected unit of measurement",
"description": "The following entities do not have the expected units of measurement ''{currency}/kWh'', ''{currency}/Wh'' or ''{currency}/MWh'':"
"description": "The following entities do not have the expected units of measurement ''{currency}/kWh'', ''{currency}/Wh'', ''{currency}/MWh'' or ''{currency}/GJ'':"
},
"entity_unexpected_unit_gas_price": {
"title": "Unexpected unit of measurement",
"description": "The following entities do not have the expected units of measurement ''{currency}/kWh'', ''{currency}/Wh'', ''{currency}/MWh'', ''{currency}/m³'' or ''{currency}/ft³'':"
"description": "The following entities do not have the expected units of measurement ''{currency}/kWh'', ''{currency}/Wh'', ''{currency}/MWh'', ''{currency}/GJ'', ''{currency}/m³'' or ''{currency}/ft³'':"
},
"entity_unexpected_state_class": {
"title": "Unexpected state class",
Expand Down

0 comments on commit 57fb8f9

Please sign in to comment.