OpenVoiceOS / skill-ovos-weather

OpenVoiceOS official Weather Skill, providing weather conditions and forecasts.
Apache License 2.0
1 stars 4 forks source link

Fix custom units from utterance #32

Closed emphasize closed 1 year ago

emphasize commented 1 year ago

Problem: ATM it is not possible to change the temperature unit per utterance.

This introduces a new property/attribute scale both to WeatherConfig and WeatherIntent from which the units (temperature/wind) is derived and fixes a bug where the spoken unit would be sent as a api request param 10.89.0.6 - - [04/Apr/2023 11:25:36] "GET /v1/owm/onecall?exclude=minutely&lang=de&lat=49.5875&lon=8.35778&units=fahrenheit HTTP/1.1" 200 - # has to metric/imperial

Furthermore weather reports can now also be requested in a different unit.

This is in line with what i intent to add later on, namely pass SkillRessources to the dialog class to be able to translate there.

this closes #31 and replaces #8