Fix weather card getUnit

This commit is contained in:
c727 2018-06-27 17:25:46 +02:00
parent 479de6c4c7
commit 584e959f1a
2 changed files with 2 additions and 2 deletions

View File

@ -203,7 +203,7 @@ class HaWeatherCard extends
}
getUnit(measure) {
const lengthUnit = this.hass.config.core.unit_system.length;
const lengthUnit = this.hass.config.core.unit_system.length || '';
switch (measure) {
case 'air_pressure':
return lengthUnit === 'km' ? 'hPa' : 'inHg';

View File

@ -156,7 +156,7 @@ class MoreInfoWeather extends LocalizeMixin(PolymerElement) {
}
getUnit(measure) {
const lengthUnit = this.hass.config.core.unit_system.length;
const lengthUnit = this.hass.config.core.unit_system.length || '';
switch (measure) {
case 'air_pressure':
return lengthUnit === 'km' ? 'hPa' : 'inHg';