Collect data from sensors into variables


I have a weather station connected to HA by ecowitt integration. I want to take these sensors (sensor.humidity, sensor.outdoor_temperature, …) and save in “variables” that I can use to make a curl into my weather station page.

Ressuming, my data way is like this:

  • Ecowitt → HA
    and I need:
  • Ecowitt → HA → my own server.

Only need how to take the variables of the data and do a script with a curl every minute.

But I don’t know how to do it…

Could someone help?

Thanks in advance

Well, I will try to be more specific.

I am trying to write a py script, saving all my variables and then I will write a curl with this units, but I don’t know how to do it. An example of this curl is: curl --data “PASSKEY=D23E2DCE1F140FB95CC12DF348FB4560&stationtype=WH2650A_V1.6.3&dateutc=2021-01-24+11:04:39&tempinf=59.9&humidityin=82&baromrelin=30.150&baromabsin=30.059&tempf=60.1&humidity=96&winddir=275&windspeedmph=2.46&windgustmph=8.05&maxdailygust=21.70&solarradiation=227.66&uv=2&rainratein=0.000&eventrainin=0.067&hourlyrainin=0.008&dailyrainin=0.067&weeklyrainin=0.067&monthlyrainin=1.969&yearlyrainin=1.969&totalrainin=1.969&wh65batt=0&wh25batt=0&freq=868M&model=WH2650”

where “tempinf” is my temperature registered in HA, humidityin…