Skip to content

Add forecast screen - #25

Open
pxp9 wants to merge 2 commits into
protolux-electronics:mainfrom
pxp9:add-7-day-forecast-view
Open

Add forecast screen#25
pxp9 wants to merge 2 commits into
protolux-electronics:mainfrom
pxp9:add-7-day-forecast-view

Conversation

@pxp9

@pxp9 pxp9 commented Feb 20, 2026

Copy link
Copy Markdown
Contributor
  • Adds the day in the current Weather view
  • Adds the forecast weather view
image image

Signed-off-by: Pepe Márquez Romero <pepe.marquezromero@protonmail.com>
@Juanes4498

Copy link
Copy Markdown

So nice

Signed-off-by: Pepe Márquez Romero <pepe.marquezromero@protonmail.com>
Comment thread lib/name_badge/screen/weather.ex Outdated

def render(%{view: :forecast} = assigns), do: render_forecast(assigns)

def render(%{weather: weather, location: location}) do

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should i extract the current view in a diff function so render function just dispatch to the corresponding render ?

Comment thread lib/name_badge/weather.ex

case Req.get(@openmeteo_url, params: params, receive_timeout: 8_000) do
{:ok, %{status: 200, body: data}} ->
current = data["current_weather"]

@pxp9 pxp9 Feb 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe extract function to parse daily ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants