jaydeethree/Home-Assistant-weatherdotcom

[FR] Service to change latitude/longitude

wigster opened this issue · 3 comments

I would like to be able to change the latitude/longitude of the weather entity through some service or even by hand. Currently, it is only possible to delete and then recreate an integration instance.

The use case is the following: I would like to have a second weather entity (in addition to my home one) which would get the forecast/conditions for the location where I happen to be e.g. on holiday. I would swap out the source for the forecast from my dashboard and I would be able to see the weather where I happen to be rather than at home.

As a secondary thing -- it would be great if the weather entity, or some other sensor, contained the current latitude/longitude of the current location, so that I could look up the city name programmatically using some reverse geo-location..

This is probably a bit against the philosophy of HA, since history of these sensors would be a splicing of multiple locations, but I think it would be a useful feature.

This is probably a bit against the philosophy of HA, since history of these sensors would be a splicing of multiple locations

Yeah, that's exactly the reason why I didn't add the option to change the latitude/longitude. While it is possible to add a reconfiguration flow for changing this, I feel like it doesn't really make sense since you would end up merging different sets of data into a single set of sensors.

it would be great if the weather entity, or some other sensor, contained the current latitude/longitude

Home Assistant does not support having that data in the weather entity:

https://developers.home-assistant.io/docs/core/entity/weather/

It should be pretty easy to add sensors for this though, so I'll plan to do that when I have time.

Latitude/longitude sensors were added in 7f3c40c and are now available in version 1.1.4.

Thanks works great!