From bc7fce7c6718340411d8b4f59465dd286e539946 Mon Sep 17 00:00:00 2001 From: Marc MERLIN Date: Sun, 23 Oct 2016 20:53:02 -0700 Subject: [PATCH] updated internet_weather.pl to be compatible with new WeatherNOAA Also fixed $city -> -city "$config_parms{city}", not too sure how it was working before, but it's not anymore. --- code/common/internet_weather.pl | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/common/internet_weather.pl b/code/common/internet_weather.pl index 96c58d9af..3c8afde7b 100644 --- a/code/common/internet_weather.pl +++ b/code/common/internet_weather.pl @@ -80,10 +80,10 @@ sub normalize_conditions { if ( said $v_get_internet_weather_data) { if (&net_connect_check) { set $p_weather_data - qq|get_weather -state $config_parms{state} -city "$city" -zone "$config_parms{zone}"|; + qq|get_weather -state $config_parms{state} -city "$config_parms{city}"|; start $p_weather_data; $v_get_internet_weather_data->respond( - "app=weather Weather data requested for $city, $config_parms{state}" + "app=weather Weather data requested for $config_parms{city}, $config_parms{state}" . ( ( $config_parms{zone} ) ? " Zone $config_parms{zone}" : '' ) ); } @@ -97,10 +97,10 @@ sub normalize_conditions { if ( said $v_get_internet_weather_conditions) { if (&net_connect_check) { set $p_weather_conditions - qq|get_weather -state $config_parms{state} -city "$city" -zone "$config_parms{zone}" -data conditions|; + qq|get_weather -state $config_parms{state} -city "$config_parms{city}" -data conditions|; start $p_weather_conditions; $v_get_internet_weather_conditions->respond( - "app=weather Weather conditions requested for $city, $config_parms{state}" + "app=weather Weather conditions requested for $config_parms{city}, $config_parms{state}" . ( ( $config_parms{zone} ) ? " Zone $config_parms{zone}" : '' ) ); } @@ -114,10 +114,11 @@ sub normalize_conditions { if ( said $v_get_internet_weather_forecast) { if (&net_connect_check) { set $p_weather_forecast - qq|get_weather -state $config_parms{state} -city "$city" -zone "$config_parms{zone}" -data forecast|; + qq|get_weather -state $config_parms{state} -city "$config_parms{city}" -data forecast|; + print_log "get_weather -state $config_parms{state} -city $config_parms{city} -data forecast"; start $p_weather_forecast; $v_get_internet_weather_forecast->respond( - "app=weather Weather forecast requested for $city, $config_parms{state}" + "app=weather Weather forecast requested for $config_parms{city}, $config_parms{state}" . ( ( $config_parms{zone} ) ? " Zone $config_parms{zone}" : '' ) ); }