mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix weather card getUnit
This commit is contained in:
parent
479de6c4c7
commit
584e959f1a
@ -203,7 +203,7 @@ class HaWeatherCard extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
getUnit(measure) {
|
getUnit(measure) {
|
||||||
const lengthUnit = this.hass.config.core.unit_system.length;
|
const lengthUnit = this.hass.config.core.unit_system.length || '';
|
||||||
switch (measure) {
|
switch (measure) {
|
||||||
case 'air_pressure':
|
case 'air_pressure':
|
||||||
return lengthUnit === 'km' ? 'hPa' : 'inHg';
|
return lengthUnit === 'km' ? 'hPa' : 'inHg';
|
||||||
|
@ -156,7 +156,7 @@ class MoreInfoWeather extends LocalizeMixin(PolymerElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getUnit(measure) {
|
getUnit(measure) {
|
||||||
const lengthUnit = this.hass.config.core.unit_system.length;
|
const lengthUnit = this.hass.config.core.unit_system.length || '';
|
||||||
switch (measure) {
|
switch (measure) {
|
||||||
case 'air_pressure':
|
case 'air_pressure':
|
||||||
return lengthUnit === 'km' ? 'hPa' : 'inHg';
|
return lengthUnit === 'km' ? 'hPa' : 'inHg';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user