streetturtle / awesome-wm-widgets

Widgets for Awesome Window Manager
http://pavelmakhov.com/awesome-wm-widgets/
MIT License
2.16k stars 280 forks source link

feat: show daily forecast #454

Closed Ryuno-Ki closed 1 month ago

Ryuno-Ki commented 2 months ago

Each day is also including hourly forecast, but this PR lays the groundwork by talking to the right endpoint.

Instead of day and night values (like in the old weather-widget) I'm showing min and max temperature as forecasted here.

Ryuno-Ki commented 2 months ago

@streetturtle 5 warnings in unrelated widgets. Do you want me to look into them? (If so here or separate PR)

streetturtle commented 2 months ago

This is amazing! Thank you @Ryuno-Ki 🚀 I'll test it this weekend.

Regarding the luacheck, no worries, I'll fix it.

xfzv commented 2 months ago

Very nice! I've just tried, so far so good.

xfzv commented 2 months ago

Will night icons be added back? After reading Weather API documentation, it seems that is_day is only listed for "hour element":

Field Data Type Description
is_day int 1 = Yes 0 = No - Whether to show day condition icon or night icon

Does it mean that "day element" will always display day icon regardless of the time of the day? Having a sun icon displayed when it's 11 PM is a bit weird.

Weather icons section in the documentation mentions both day: and night: conditions but only one icon: field.

Ryuno-Ki commented 2 months ago

Good question.

You're partially right. It is part of the hour field (I just checked). But the astro one also contains is_moon_up and is_sun_up. Now it is possible that both are true :) But when I would use the is_sun_up to determine which icon to show it should be possible. That would go into the hourly forecast.

Looking at the current field I can see a is_day here which I haven't noticed before.

Are you okay with moving this request to another PR?