mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-31 23:21:18 +01:00
feat: combine hourly weather into single feed item (#100)
* feat: combine hourly weather into single feed item Co-authored-by: Ona <no-reply@ona.com> * fix: use worst-case timeRelevance, improve tests - Use most urgent timeRelevance across hours instead of hardcoded Ambient - Use HourlyWeatherData type in test casts - Add test for averaged urgency with mixed conditions Co-authored-by: Ona <no-reply@ona.com> --------- Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -32,7 +32,7 @@ export interface CurrentWeatherFeedItem extends FeedItem<
|
||||
CurrentWeatherData
|
||||
> {}
|
||||
|
||||
export type HourlyWeatherData = {
|
||||
export type HourlyWeatherEntry = {
|
||||
forecastTime: Date
|
||||
conditionCode: ConditionCode
|
||||
daylight: boolean
|
||||
@@ -48,6 +48,10 @@ export type HourlyWeatherData = {
|
||||
windSpeed: number
|
||||
}
|
||||
|
||||
export type HourlyWeatherData = {
|
||||
hours: HourlyWeatherEntry[]
|
||||
}
|
||||
|
||||
export interface HourlyWeatherFeedItem extends FeedItem<
|
||||
typeof WeatherFeedItemType.Hourly,
|
||||
HourlyWeatherData
|
||||
|
||||
Reference in New Issue
Block a user