Refactor watering scale logic flow
This commit is contained in:
13
types.ts
13
types.ts
@@ -50,20 +50,23 @@ export interface WeatherDataForecast {
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface BaseWateringData {
|
||||
/** The WeatherProvider that generated this data. */
|
||||
weatherProvider: WeatherProviderId;
|
||||
/** The total precipitation over the window (in inches). */
|
||||
precip: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Data from a 24 hour window that is used to calculate how watering levels should be scaled. This should ideally use
|
||||
* historic data from the past day, but may also use forecasted data for the next day if historical data is not
|
||||
* available.
|
||||
*/
|
||||
export interface WateringData {
|
||||
/** The WeatherProvider that generated this data. */
|
||||
weatherProvider: WeatherProviderId;
|
||||
export interface ZimmermanWateringData extends BaseWateringData {
|
||||
/** The average temperature over the window (in Fahrenheit). */
|
||||
temp: number;
|
||||
/** The average humidity over the window (as a percentage). */
|
||||
humidity: number;
|
||||
/** The total precipitation over the window (in inches). */
|
||||
precip: number;
|
||||
/** A boolean indicating if it is raining at the time that this data was retrieved. */
|
||||
raining: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user