From 014701782bb40c6256461488f7fa4acd26ccc189 Mon Sep 17 00:00:00 2001 From: Mark-C-uk Date: Thu, 30 Aug 2018 08:29:46 +0100 Subject: [PATCH] updated to alow personal weather station id a personal weather station id can now be added to force the results froma diffent weather station ie https://www.wunderground.com/cgi-bin/findweather/getForecast?query=pr5%205sf&hdf=1 you could have pws:ILEYLAND2 or pws:IPRESTON39 --- .../weather-underground-web.groovy | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/devicetypes/philippeportesppo/weather-underground-web.src/weather-underground-web.groovy b/devicetypes/philippeportesppo/weather-underground-web.src/weather-underground-web.groovy index bac6bbc..0c90085 100644 --- a/devicetypes/philippeportesppo/weather-underground-web.src/weather-underground-web.groovy +++ b/devicetypes/philippeportesppo/weather-underground-web.src/weather-underground-web.groovy @@ -136,6 +136,9 @@ metadata { main("wu_main") details(["UGW_web","temperature","humidity","UGWFeelsLikelevel","UGWdewpointlevel","UGW_Icon_UrlIcon","weather","refresh" ]) } + preferences { + input name: "pws", type: "text", title: "personal weather station id", description: "should be formatted pws:xxx", required: false + } } def installed() { @@ -191,8 +194,9 @@ def forcepoll() def refresh() { log.debug "Executing 'refresh'" - def mymap = getWeatherFeature("conditions") - + def mymap = getWeatherFeature("conditions", settings.pws) +//log.debug "${mymap}" + log.debug "location : ${mymap['current_observation']['station_id']}" log.debug "response feelslike_c: ${mymap['current_observation']['feelslike_c']}" log.debug "response dewpoint_c: ${mymap['current_observation']['dewpoint_c']}" log.debug "response relative_humidity: ${mymap['current_observation']['relative_humidity']}" @@ -291,4 +295,4 @@ def refresh() { state.highhumidityalert=false } -} \ No newline at end of file +}