fix condition/.. requests with location information#175
fix condition/.. requests with location information#175emphasize wants to merge 3 commits intoMycroftAI:21.02from
Conversation
|
I would think that this should be There is something strange here since the vocab file for location (location.voc) has small letters so this won't be used in addition to the regex. If so it could maybe be removed? |
|
I wondered about the Will revert to uppercase in the constructors and message key get. |
| self.name += "-sunset-future" | ||
| else: | ||
| self.name = ".sunset.past" | ||
| self.name = "-sunset-past" |
There was a problem hiding this comment.
Found another one. This should be self.name += "-sunset-past"
|
Hey emphasize, thanks heaps for all the detective work and fixes on these Skills! I was just doing some testing on a blank Skill and with only a The potential conflict of Given this is @chrisveilleux's refactor I'll let him make the final call on when this is ready. |
|
|
||
| @intent_handler( | ||
| IntentBuilder("").require("ConfirmQuery").require("Rain").optionally("location") | ||
| IntentBuilder("").require("ConfirmQuery").require("Rain").optionally("Location") |
There was a problem hiding this comment.
Ah it looks like this got changed in a recent commit from @chrisveilleux that's not yet on your fork.
To reproduce:
issue a fog / sunrise report for a specific location ("is it foggy in New York")
Problems:
Several intents (condition/storm/rain/...) have
.optionally("Location")in their constructor while others go with.optionally("location"). This resulting in the location getting ignored.If you issue a sunrise request at a specific location
now = now_local(tz=self.intent_data.geolocation["timezone"])throws an exceptionself.name += ".sunset.future"(should be"-sunset-future")What this PR does
lower casecapitalizedget_tz_infofrom skill.util to convert the timezone stringType of PR
Bugfix
CLA