Add attribution to Watering Data
This commit is contained in:
@@ -54,6 +54,7 @@ async function calculateEToWateringScale(
|
||||
return {
|
||||
scale: scale,
|
||||
rawData: {
|
||||
weatherProvider: etoData.weatherProvider,
|
||||
eto: Math.round( eto * 1000) / 1000,
|
||||
radiation: Math.round( etoData.solarRadiation * 100) / 100,
|
||||
minT: Math.round( etoData.minTemp ),
|
||||
|
||||
@@ -7,6 +7,9 @@ import { AdjustmentMethod, AdjustmentMethodResponse } from "./AdjustmentMethod";
|
||||
async function calculateManualWateringScale( ): Promise< AdjustmentMethodResponse > {
|
||||
return {
|
||||
scale: undefined,
|
||||
rawData: {
|
||||
weatherProvider: "Manual",
|
||||
},
|
||||
wateringData: undefined
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,10 @@ async function calculateRainDelayWateringScale( adjustmentOptions: RainDelayAdju
|
||||
const d = adjustmentOptions.hasOwnProperty( "d" ) ? adjustmentOptions.d : 24;
|
||||
return {
|
||||
scale: undefined,
|
||||
rawData: { raining: raining ? 1 : 0 },
|
||||
rawData: {
|
||||
weatherProvider: wateringData.weatherProvider,
|
||||
raining: raining ? 1 : 0,
|
||||
},
|
||||
rainDelay: raining ? d : undefined,
|
||||
wateringData: wateringData
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ async function calculateZimmermanWateringScale(
|
||||
*/
|
||||
|
||||
const rawData = {
|
||||
weatherProvider: 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,
|
||||
|
||||
Reference in New Issue
Block a user