-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix condition/.. requests with location information #175
base: 21.02
Are you sure you want to change the base?
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. |
skill/dialog.py
Outdated
else: | ||
self.name = ".sunset.past" | ||
self.name = "-sunset-past" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found another one. This should be self.name += "-sunset-past"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
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. |
__init__.py
Outdated
@@ -430,7 +430,7 @@ def handle_is_it_foggy(self, message: Message): | |||
self._report_weather_condition(message, "fog") | |||
|
|||
@intent_handler( | |||
IntentBuilder("").require("ConfirmQuery").require("Rain").optionally("location") | |||
IntentBuilder("").require("ConfirmQuery").require("Rain").optionally("Location") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is capitalized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_info
from skill.util to convert the timezone stringType of PR
Bugfix
CLA