Reduce length of weatherProvider field in response
This commit is contained in:
@@ -54,7 +54,7 @@ async function calculateEToWateringScale(
|
||||
return {
|
||||
scale: scale,
|
||||
rawData: {
|
||||
weatherProvider: etoData.weatherProvider,
|
||||
wp: etoData.weatherProvider,
|
||||
eto: Math.round( eto * 1000) / 1000,
|
||||
radiation: Math.round( etoData.solarRadiation * 100) / 100,
|
||||
minT: Math.round( etoData.minTemp ),
|
||||
|
||||
@@ -8,7 +8,7 @@ async function calculateManualWateringScale( ): Promise< AdjustmentMethodRespons
|
||||
return {
|
||||
scale: undefined,
|
||||
rawData: {
|
||||
weatherProvider: "Manual",
|
||||
wp: "Manual",
|
||||
},
|
||||
wateringData: undefined
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ async function calculateZimmermanWateringScale(
|
||||
*/
|
||||
|
||||
const rawData = {
|
||||
weatherProvider: wateringData.weatherProvider,
|
||||
wp: wateringData.weatherProvider,
|
||||
h: wateringData ? Math.round( wateringData.humidity * 100) / 100 : null,
|
||||
p: wateringData ? Math.round( wateringData.precip * 100 ) / 100 : null,
|
||||
t: wateringData ? Math.round( wateringData.temp * 10 ) / 10 : null,
|
||||
|
||||
@@ -60,7 +60,7 @@ export default class DarkSkyWeatherProvider extends WeatherProvider {
|
||||
}
|
||||
|
||||
return {
|
||||
weatherProvider: "DarkSky",
|
||||
weatherProvider: "DS",
|
||||
temp: totals.temp / 24,
|
||||
humidity: totals.humidity / 24 * 100,
|
||||
precip: totals.precip,
|
||||
@@ -147,7 +147,7 @@ export default class DarkSkyWeatherProvider extends WeatherProvider {
|
||||
}
|
||||
|
||||
return {
|
||||
weatherProvider: "DarkSky",
|
||||
weatherProvider: "DS",
|
||||
periodStartTime: historicData.hourly.data[ 0 ].time,
|
||||
minTemp: historicData.daily.data[ 0 ].temperatureMin,
|
||||
maxTemp: historicData.daily.data[ 0 ].temperatureMax,
|
||||
|
||||
@@ -37,7 +37,7 @@ export default class WUnderground extends WeatherProvider {
|
||||
}
|
||||
|
||||
return {
|
||||
weatherProvider: "WUnderground",
|
||||
weatherProvider: "WU",
|
||||
temp: totals.temp / samples.length,
|
||||
humidity: totals.humidity / samples.length,
|
||||
precip: totals.precip,
|
||||
|
||||
Reference in New Issue
Block a user