From 22a9b68373b0f5468369e9378f23d94ab1b94c91 Mon Sep 17 00:00:00 2001 From: "Andrey \"Limych\" Khrolenok" Date: Sun, 24 Mar 2019 19:03:31 +0300 Subject: [PATCH 1/8] New options 'entity' & 'pressure2mmhg' + Added ability to convert pressure to mmHg. Added option 'pressure2mmhg' + Added option 'entity' for compatibility with Weather Forecast Card. * Now, if there is no translation for the current language, the text is taken from the default language: English --- custom-weather-card-chart.js | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/custom-weather-card-chart.js b/custom-weather-card-chart.js index 7e52284..2d068ba 100644 --- a/custom-weather-card-chart.js +++ b/custom-weather-card-chart.js @@ -16,6 +16,7 @@ const locale = { tempLo: "Temperature night", precip: "Precipitations", uPress: "hPa", + uPressMmHg: "mmHg", uSpeed: "m/s", uPrecip: "mm", cardinalDirections: [ @@ -52,6 +53,7 @@ const locale = { tempLo: "Температура ночью", precip: "Осадки", uPress: "гПа", + uPressMmHg: "мм", uSpeed: "м/с", uPrecip: "мм", cardinalDirections: [ @@ -134,7 +136,7 @@ class WeatherCardChart extends Polymer.Element {
[[roundNumber(weatherObj.attributes.humidity)]] %
- [[roundNumber(weatherObj.attributes.pressure)]] [[ll('uPress')]] + [[computePressure(weatherObj.attributes.pressure)]] [[ll('uPress')]]