Allow for station data overrides #125
This commit is contained in:
parent
2db7f30de7
commit
7d50ce28bd
6 changed files with 16169 additions and 16139 deletions
|
|
@ -114,11 +114,14 @@ class CurrentWeather extends WeatherDisplay {
|
|||
|
||||
const wind = (typeof this.data.WindSpeed === 'number') ? this.data.WindDirection.padEnd(3, '') + this.data.WindSpeed.toString().padStart(3, ' ') : this.data.WindSpeed;
|
||||
|
||||
// get location (city name) from StationInfo if available (allows for overrides)
|
||||
const location = (StationInfo[this.data.station.properties.stationIdentifier]?.city ?? locationCleanup(this.data.station.properties.name)).substr(0, 20);
|
||||
|
||||
const fill = {
|
||||
temp: this.data.Temperature + String.fromCharCode(176),
|
||||
condition,
|
||||
wind,
|
||||
location: locationCleanup(this.data.station.properties.name).substr(0, 20),
|
||||
location,
|
||||
humidity: `${this.data.Humidity}%`,
|
||||
dewpoint: this.data.DewPoint + String.fromCharCode(176),
|
||||
ceiling: (this.data.Ceiling === 0 ? 'Unlimited' : this.data.Ceiling + this.data.CeilingUnit),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue