forked from gras64/human-help-skill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
42 lines (29 loc) · 1.12 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from mycroft import MycroftSkill, intent_file_handler
class HumanHelp(MycroftSkill):
def __init__(self):
MycroftSkill.__init__(self)
def initialize(self):
self.settings["phonenumber"] = self.settings.get('phonenumber', False)
@intent_file_handler('help.human.intent')
def handle_help_human(self, message):
ambulance = self.ask_yesno('should_call_ambulance')
if ambulance == "yes":
self.speak_dialog('emergency_doctor')
else:
problem = ""
self.speak_dialog('what_your_problem', expect_response=problem)
###### todoo some code
self.speak_dialog('help.human')
def heart_attack(self):
self.log.info("Heart attack diagnosed")
def unconsciousness(self):
self.log.info("Stable side situation")
def shock_situation(self):
self.log.info("shock known")
def poisoning(self):
self.log.info("poisoning detected")
@intent_file_handler('call_mum.intent')
def handle_call_mum(self, message):
self.speak_dialog('mum_is_coming')
def create_skill():
return HumanHelp()