I wonder if it is possible to get the weather from two( or more) different locations at the same time.
I want to control the light controller of my fish tank with the cloud and sunset from a location in thailand (with an offset) but also want to get my local weather for other home releated stuff.
I thought maybe i can use the zone componet for that but im pretty new to this stuff and dont know where to put my effort in.
Since most of the weather sensors available seem to use the lat and longitude from your config file, you will probably need to use something such as a rest sensor. https://home-assistant.io/components/sensor.rest/
Pull the data from a weather api using the coordinates of where ever you want weather from, the rest sensor will poll that data periodically. Then you will need to make different sensors (template sensors maybe) to use just the cloud or sun data from the rest sensors data.
Its a bit complex if you don’t know what you’re doing really, its a bit of a shame you cant just enter a latitude and longitude and have a second weather sensor that is already built into home assistant. Maybe there is though - I didn’t check too hard.
and altered it so that all references to pws were changed to gws (in my example). Take note of uppercase and lowercase and find/replace as appropriate.
I then pasted the code into wunderground2.py in Homeassistant’s custom components folder, and added it to my config file as per the existing wunderground for the first location, albeit as wunderground2. This created new sensors in HA called sensor.gws etc. etc. which work a treat alongside the sensor.pws entries from the original code.
Example groups.yaml for the 2nd wunderground sensor:
Ok so make a copy of the .py file, name it something else and edit the copy. Change all the .pws variables to something else. I made mine gws. These are the variables that the code grabs via the API. Then use the built in component in Hass for one location and the copy you made as a custom component.