From 3112498f3c47155559393b27c1b8b6d3a421670d Mon Sep 17 00:00:00 2001 From: Matthew Oslan Date: Sat, 6 Jul 2019 10:17:44 -0400 Subject: [PATCH] Error if a PWS is used with the ETo AdjustmentMethod --- routes/adjustmentMethods/EToAdjustmentMethod.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routes/adjustmentMethods/EToAdjustmentMethod.ts b/routes/adjustmentMethods/EToAdjustmentMethod.ts index b8e11de..03a7846 100644 --- a/routes/adjustmentMethods/EToAdjustmentMethod.ts +++ b/routes/adjustmentMethods/EToAdjustmentMethod.ts @@ -16,6 +16,10 @@ async function calculateEToWateringScale( pws?: PWS ): Promise< AdjustmentMethodResponse > { + if ( pws ) { + throw "ETo adjustment method does not support personal weather stations through WUnderground."; + } + // Temporarily disabled since OWM forecast data is checking if rain is forecasted for 3 hours in the future. /* if ( wateringData && wateringData.raining ) {