Skip to content

Commit

Permalink
Merge pull request #637 from marcmerlin/fix_internet_weather
Browse files Browse the repository at this point in the history
updated internet_weather.pl to be compatible with new WeatherNOAA
  • Loading branch information
marcmerlin authored Oct 24, 2016
2 parents 250a5f8 + bc7fce7 commit 390eadf
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions code/common/internet_weather.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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}" : '' )
);
}
Expand All @@ -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}" : '' )
);
}
Expand All @@ -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}" : '' )
);
}
Expand Down

0 comments on commit 390eadf

Please sign in to comment.