stanford-oval / thingpedia-common-devices

Thingpedia interface code for commonly used devices
Other
38 stars 28 forks source link

Weather forecast doesn't find the right time #414

Open gcampax opened 3 years ago

gcampax commented 3 years ago

Log (notice it is parsed correctly):

====
# main/0cc5d1a4-4d91-443b-8c5e-d4d21e99d53a
#! timestamp: 2021-08-03T19:40:48.920Z
U: will it rain tomorrow
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.weather.forecast();
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: @org.thingpedia.weather.forecast(location=new Location(37.4863239, -122.232523, "Redwood City, California"), date=$end_of(day))
C: #[results=[
C:   { temperature=13.7C, wind_speed=1.8mps, humidity=81.1, cloudiness=68, fog=0, status=enum cloudy, icon="http://api.met.no/weatherapi/weathericon/1.1/?symbol=3;content_type=image/png"^^tt:picture, date=new Date("2021-08-04T14:00:00.000Z"), location=new Location(37.4863239, -122.232523, "Redwood City, California") }
C: ]];
#! timestamp: 2021-08-03T19:40:50.452Z
A: It will be cloudy tomorrow at 7:00 AM in Redwood City, California and the temperature will be 13.7 C.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_display_result;
#! timestamp: 2021-08-03T19:41:00.736Z
U: will it rain tomorrow at 2pm
UT: $dialogue @org.thingpedia.dialogue.transaction.execute;
UT: @org.thingpedia.weather.forecast(date=set_time($end_of(day), new Time(14, 0)));
C: $dialogue @org.thingpedia.dialogue.transaction.execute;
C: @org.thingpedia.weather.forecast(location=new Location(37.4863239, -122.232523, "Redwood City, California"), date=$end_of(day))
C: #[results=[
C:   { temperature=13.7C, wind_speed=1.8mps, humidity=81.1, cloudiness=68, fog=0, status=enum cloudy, icon="http://api.met.no/weatherapi/weathericon/1.1/?symbol=3;content_type=image/png"^^tt:picture, date=new Date("2021-08-04T14:00:00.000Z"), location=new Location(37.4863239, -122.232523, "Redwood City, California") }
C: ]];
C: @org.thingpedia.weather.forecast(date=set_time($end_of(day), new Time(14, 0)), location=new Location(37.4863239, -122.232523, "Redwood City, California"))
C: #[results=[
C:   { temperature=13.7C, wind_speed=1.8mps, humidity=81.1, cloudiness=68, fog=0, status=enum cloudy, icon="http://api.met.no/weatherapi/weathericon/1.1/?symbol=3;content_type=image/png"^^tt:picture, date=new Date("2021-08-04T14:00:00.000Z"), location=new Location(37.4863239, -122.232523, "Redwood City, California") }
C: ]];
#! timestamp: 2021-08-03T19:41:01.918Z
A: It will be cloudy tomorrow at 7:00 AM in Redwood City, California and the temperature will be 13.7 C.
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_display_result;
#! timestamp: 2021-08-03T19:41:16.789Z
U: cancel
UT: $dialogue @org.thingpedia.dialogue.transaction.cancel;
C: $dialogue @org.thingpedia.dialogue.transaction.cancel;
C: @org.thingpedia.weather.forecast(location=new Location(37.4863239, -122.232523, "Redwood City, California"), date=$end_of(day))
C: #[results=[
C:   { temperature=13.7C, wind_speed=1.8mps, humidity=81.1, cloudiness=68, fog=0, status=enum cloudy, icon="http://api.met.no/weatherapi/weathericon/1.1/?symbol=3;content_type=image/png"^^tt:picture, date=new Date("2021-08-04T14:00:00.000Z"), location=new Location(37.4863239, -122.232523, "Redwood City, California") }
C: ]];
C: @org.thingpedia.weather.forecast(date=set_time($end_of(day), new Time(14, 0)), location=new Location(37.4863239, -122.232523, "Redwood City, California"))
C: #[results=[
C:   { temperature=13.7C, wind_speed=1.8mps, humidity=81.1, cloudiness=68, fog=0, status=enum cloudy, icon="http://api.met.no/weatherapi/weathericon/1.1/?symbol=3;content_type=image/png"^^tt:picture, date=new Date("2021-08-04T14:00:00.000Z"), location=new Location(37.4863239, -122.232523, "Redwood City, California") }
C: ]];
#! timestamp: 2021-08-03T19:41:16.807Z
A: Alright, let me know if I can help you with anything else!
AT: $dialogue @org.thingpedia.dialogue.transaction.sys_end;

(this might be related to https://github.com/stanford-oval/almond-cloud/issues/1064 though)