Features/mouth stocks (#261)
* added mouth stock display * changed sleep length * pep8pull/270/head
parent
8ce18f630b
commit
c021bcbbb0
|
@ -16,6 +16,7 @@
|
|||
# along with Mycroft Core. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from os.path import dirname, join
|
||||
import time
|
||||
import requests
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
|
@ -46,7 +47,15 @@ class StockSkill(MycroftSkill):
|
|||
company = message.metadata.get("Company")
|
||||
try:
|
||||
response = self.find_and_query(company)
|
||||
self.emitter.once("recognizer_loop:audio_output_start",
|
||||
self.enclosure.mouth_text(
|
||||
response['symbol']+": " + response['price']))
|
||||
self.enclosure.activate_mouth_listeners(False)
|
||||
self.speak_dialog("stock.price", data=response)
|
||||
time.sleep(12)
|
||||
self.enclosure.activate_mouth_listeners(True)
|
||||
self.enclosure.mouth_reset()
|
||||
|
||||
except:
|
||||
self.speak_dialog("not.found", data={'company': company})
|
||||
|
||||
|
|
Loading…
Reference in New Issue