Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change locations form settings config #336

Open
8 tasks done
cloneofghosts opened this issue Oct 27, 2024 · 3 comments
Open
8 tasks done

Unable to change locations form settings config #336

cloneofghosts opened this issue Oct 27, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@cloneofghosts
Copy link
Collaborator

Describe the bug

When I was testing the new update I was looking for a location which had precipitation for the current day. I found a location to test with (Victoria, BC) and after confirming that the API returned data for the current day liquid I went to change my location using the settings config.

After I entered in the new lat/long and the data refreshed it still showed the data for my current location instead of the location I entered. In order to test with the new location I had to setup the integration again in order to test to see if it worked.

Expected behavior

I should be able to change locations from the settings config without having to setup the integration.

Actual behavior

I have to setup the integration again in order for the new location to be used.

Home Assistant version

2024.10.4

Integration version

1.6.1

Other details

No response

Troubleshooting steps

  • I have updated my Home Assistant installation to the latest version.
  • I have updated the Pirate Weather Integration to the latest version.
  • I have gone through the documentation before opening this issue.
  • I have searched this repository and API Repository to see if the issue has already been reported.
  • I have restarted my Home Assistant installation.
  • I have queried the API in my browser to confirm the issue is not with the API.
  • I have not included my API key anywhere in my issue.
  • I have written an informative title.
@alexander0042
Copy link
Collaborator

So to be honest, I'd forgotten that this was even possible, since my initial instinct was that it wasn't; however, it's clearly in there as an option, so should either work or be removed. Can you see if the logs are showing requests for the new location? And does restarting cause it to flip to the new location?

@cloneofghosts
Copy link
Collaborator Author

I didn't try restarting after I changed the location but I can definitely try that. I thought the integration doesn't output the location you queried with the API anymore as a result of #246.

I can add it in to my devcontainer for debugging purposes if it's helpful.

@cloneofghosts
Copy link
Collaborator Author

This was what the location I had it set to for testing: (Vancouver)
image

This is what I changed it to: (Calgary)
image

This is what was shown in the logs after I changed the location:

2024-11-03 20:18:44.692 INFO (MainThread) [custom_components.pirateweather] Unloading Pirate Weather
2024-11-03 20:18:44.937 DEBUG (MainThread) [custom_components.pirateweather.weather_update_coordinator] Pirate Weather data update
2024-11-03 20:18:44.939 DEBUG (MainThread) [custom_components.pirateweather.weather_update_coordinator] Pirate Weather data update for 48.433, -123.362
2024-11-03 20:18:44.939 DEBUG (MainThread) [custom_components.pirateweather.weather_update_coordinator] Finished fetching pirateweather data in 0.245 seconds (success: True)
2024-11-03 20:18:44.941 INFO (MainThread) [homeassistant.components.sensor] Setting up pirateweather.sensor
2024-11-03 20:18:44.958 INFO (MainThread) [homeassistant.components.weather] Setting up pirateweather.weather

Even after restarting the devcontainer it is still pulling data from the previous location and not the new one which I just configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants