Port the weather dataengine
The weather dataengine complicates the weather widget because many data are processed in the widget side instead of the dataengine side. To simplify the widget, the ion interface will need some refactoring to provide the information that suits the weather widget. There should be a day model to provide weather forecast so the widget can list them using a ListView. The widget should show information from the provider based on their capabilities instead of checking undefined values.
WeatherModel (unit: day)
Property
Type
Description
source
string
weather source
updateInterval
int
location
string or int or [double,double]
Type depends on the weather source
temperatureUnit
enum
pressureUnit
enum
visibilityUnit
enum
speedUnit
enum
count
int
Total forecast days
roleNames
hash
updateTime
time
hourlyModel
model
roleNames
Name
Type
Description
capabilities
flags
condition
enum
to weather icon, see https://openweathermap.org/weather-conditions#Weather-Condition-Codes-2
currentTemperature
double
currentFeelTemperature
double
averageTemperature
double
maxTemperature
double
minTemperature
double
humidity
double
pressure
double
pressureTendency
enum
visibility
double
windSpeed
double
windDirection
enum
windGust
double
dewPoint
double
precipitation
double
mm
detailsLink
url
Link to see more details of the day
notices
model
List of weather notices
capabilities
Enum
Property
HourlyForecast
hourlyModel
DayNightForecast
CurrentTemperature
currentTemperature
CurrentFeelTemperature
currentFeelTemperature
AverageTemperature
averageTemperature
MaxTemperature
maxTemperature
MinTemperature
minTemperature
Humidity
humidity
Pressure
pressure
Visibility
visibility
WindSpeed
windSpeed
WindDirection
windDirection
WindGust
windGust
DewPoint
dewPoint
Precipitation
precipitation
DetailsLink
detailsLink
Notices
notices
units
temperatureUnit
pressureUnit
visibilityUnit
speedUnit
Celsius
Pa
m
m/s
Fahrenheit
atm
km
km/h
bar
mph
pressureTedency
windDirection
North
NorthNorthEast
NorthEast
EastNorthEast
East
EastSouthEast
SouthEast
SouthSouthEast
South
SouthWest
WestSouthWest
West
WestNorthWest
NorthWest
NorthNorthWest
Ref
Edited
Dec 29, 2023 by
Fushan Wen