output weather to file, added spaces
This commit is contained in:
parent
1e627b0bad
commit
31e961529a
2
bot.sh
2
bot.sh
@ -23,7 +23,7 @@ upload_speed=$(grep -oP 'Upload: \K.*(?= Mbit/s)' $speedtest_result)
|
||||
|
||||
#################################################################################
|
||||
# Make the API request
|
||||
response=$(curl -s "https://api.open-meteo.com/v1/forecast?latitude=${LATITUDE}&longitude=${LONGITUDE}¤t_weather=true" > $weather_file)
|
||||
curl -s "https://api.open-meteo.com/v1/forecast?latitude=${LATITUDE}&longitude=${LONGITUDE}¤t_weather=true" > $weather_file
|
||||
# Extract Weather Condition
|
||||
weather_condition=$(cat $weather_file | jq '.current_weather.weathercode')
|
||||
case $weather_condition in
|
||||
|
Loading…
x
Reference in New Issue
Block a user