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