Skip to content

Conversation

@xE1H
Copy link
Contributor

@xE1H xE1H commented Nov 5, 2025

Breaking change

Proposed change

This PR fixes #155875. Not all data that was fetched from the API was converted toForecast objects, it was truncated to 24h and 5d for hourly and daily, respectively.
It also fixes a related issue -- timestamps not being converted to UTC for the Forecast object. It fixes the desync between the meteo.lt site and the integration due to incorrect timezone handling on the integration.

I've reduced the scope for now as I'm still not 100% sure about the timestamp issue. I'll raise a new PR for it.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Please tag for 2025.11.1

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes timezone handling and forecast data processing in the Meteo.lt weather integration. The changes ensure forecast timestamps include proper timezone information (Europe/Vilnius) and remove arbitrary limits on the number of forecasts returned.

Key changes:

  • Added timezone conversion for all forecast timestamps using ZoneInfo
  • Removed hardcoded limits on daily and hourly forecast counts
  • Introduced helper method _convert_api_timestamp_to_datetime for consistent timestamp handling

@gjohansson-ST gjohansson-ST added this to the 2025.11.1 milestone Nov 5, 2025
@frenck frenck modified the milestones: 2025.11.1, 2025.11.2 Nov 7, 2025
@xE1H xE1H changed the title Fix format timestamps to UTC and fix limit of hourly & daily data for meteo.lt Fix data desynchronization due to timezones and fix limit of hourly & daily data for meteo.lt Nov 12, 2025
@xE1H xE1H changed the title Fix data desynchronization due to timezones and fix limit of hourly & daily data for meteo.lt Fix hourly data incorrect timestamp information & remove forecast limit for meteo_lt Nov 12, 2025
@home-assistant home-assistant bot marked this pull request as draft November 12, 2025 15:40
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@xE1H
Copy link
Contributor Author

xE1H commented Nov 13, 2025

I've reduced the scope for now as I'm still not 100% sure about the timestamp issue. I'll raise a new PR for it later on, let's just get the removal of limits merged for now.

@xE1H xE1H changed the title Fix hourly data incorrect timestamp information & remove forecast limit for meteo_lt Remove arbitrary forecast limit for meteo_lt Nov 13, 2025
@xE1H xE1H marked this pull request as ready for review November 13, 2025 16:07
Copy link
Member

@edenhaus edenhaus left a comment

Choose a reason for hiding this comment

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

Thanks @xE1H 👍

@edenhaus edenhaus merged commit 55476ef into home-assistant:dev Nov 13, 2025
36 checks passed
@xE1H xE1H deleted the meteo-155875 branch November 13, 2025 23:20
@frenck frenck mentioned this pull request Nov 14, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

meteo_lt - not showing all hourly forecasts available via API

4 participants