MycroftAI / mycroft-dinkum

A consumer ready version of Mycroft specifically for the Mark II.
Apache License 2.0
20 stars 8 forks source link

Skill 593 weather skill gets confused by c f #24

Closed alan-mycroft closed 2 years ago

alan-mycroft commented 2 years ago

Description

The weather skill was having trouble setting temperature units based on the settings in selene. In some cases it manifested as quite odd behavior such as completely incorrect temperature readings. This was happening because the skill was juggling two different attributes values which were semantically identical (for our purposes). The API wants "metric" or 'imperial', but when the temp is spoken we need 'celsius' or 'fahrenheit'. I made it use only one attribute and added something to the api calling method that simply translates f/c into i/m.

Type of PR

If your PR fits more than one category, there is a high chance you should submit more than one PR. Please consider this carefully before opening the PR. Either delete those that do not apply, or add an x between the square brackets like so: - [x]

Testing

Switch settings on selene, wait a minute.