bugfix to v19 (#90)
* conversiont to python 3 Signed-off-by: Tommaso Morello tommaso.morello@gmail.com (github: mortommy) * docs updating * README.md changed to v18.08 * README.md changed to v18.08 * Fix multilanguage bugs 2 (#35) * bright bright command instead of brighten * italian translation added voc files for italian translation Signed-off-by: mortommy <tommaso.morello@gmail.com> * intensita instead of luminosita (#36) Signed-off-by: Tommaso Morello <tommaso.morello@gmail.com> (github: mortommy)Signed-off-by: mortommy <tommaso.morello@gmail.com> * conversiont to python 3 Signed-oof-by: Tommaso Morello tommaso.morello@gmail.com (github: mortommy) Signed-off-by: mortommy <tommaso.morello@gmail.com> * Update documentation links (#37) Signed-off-by: Wouter Born <eclipse@maindrain.net>Signed-off-by: mortommy <tommaso.morello@gmail.com> * docs updating Signed-off-by: mortommy <tommaso.morello@gmail.com> * add German (#46) added german translation Signed-off-by: mortommy <tommaso.morello@gmail.com> * German Translation (#42) Signed-off-by: mortommy <tommaso.morello@gmail.com> * Fixed typo (#48) * Fixed typo "Brigth -> Bright" * Fixed typo * Fixed typo Signed-off-by: mortommy <tommaso.morello@gmail.com> * Update dimmer_command.rx (#53) Signed-off-by: mortommy <tommaso.morello@gmail.com> * Update dimmer_command.rx (#52) This spelling error was identified by user **LeBelle** who has been undertaking German translations on Mycroft Translate. Raising PR on LeBelle's behalf. Signed-off-by: mortommy <tommaso.morello@gmail.com> * README.md changed to v18.08 Signed-off-by: mortommy <tommaso.morello@gmail.com> * README.md changed to v18.08 Signed-off-by: mortommy <tommaso.morello@gmail.com> * added "turn x on/off" as a command (#56) It feels more natural for me to say turn light on instead of turn on light x Signed-off-by: mortommy <tommaso.morello@gmail.com> * added spanish support. Signed-off-by: Tommaso Morello tommaso.morello@gmail.com (github: mortommy) Signed-off-by: mortommy <tommaso.morello@gmail.com> * Revert "Add spanish" * added spanish support. Signed-off-by: Tommaso Morello tommaso.morello@gmail.com (github: mortommy) * Revert "Add spanish" * added spanish support. Signed-off-by: Tommaso Morello tommaso.morello@gmail.com (github: mortommy) * added spanish support. Signed-off-by: Tommaso Morello tommaso.morello@gmail.com (github: mortommy) * Fix supported languages list Signed-off-by: Tommaso Morello <tommaso.morello@gmail.com> * Revert "Fix supported languages list" * Fix supported languages list Signed-off-by: Tommaso Morello <tommaso.morello@gmail.com> * Fix languages values Signed-off-by: Tommaso Morello <tommaso.morello@gmail.com> * tuning what status intent. switch to padatious Signed-off-by: Tommaso Morello <tommaso.morello@gmail.com> * Convert what_status intent to padatious. Apply review from Mycroft team. Add new files Signed-off-by: Tommaso Morello <tommaso.morello@gmail.com> * Bug fix Signed-off-by: Tommaso Morello <tommaso.morello@gmail.com> * Bug fix 2 Signed-off-by: Tommaso Morello <tommaso.morello@gmail.com> * Bug fix 3 Signed-off-by: Tommaso Morello <tommaso.morello@gmail.com> * Bug fix 4 Signed-off-by: Tommaso Morello <tommaso.morello@gmail.com> * dimmer command regex fix Signed-off-by: Tommaso Morello <tommaso.morello@gmail.com> * Bug fix V19 Signed-off-by: mortommy <tommaso.morello@gmail.com> Co-authored-by: Wouter Born <github@maindrain.net> Co-authored-by: Andreas Reinle <gras64@web.de> Co-authored-by: Sawyer McLane <samclane@gmail.com> Co-authored-by: Kathy Reid <kathy@kathyreid.id.au> Co-authored-by: Fabian Pflug <gumulka@users.noreply.github.com>pull/91/head
parent
f15b90c266
commit
6ed5b806ee
43
__init__.py
43
__init__.py
|
@ -122,6 +122,10 @@ class openHABSkill(MycroftSkill):
|
||||||
self.targetTemperatureItemsDic = {}
|
self.targetTemperatureItemsDic = {}
|
||||||
self.homekitHeatingCoolingModeDic = {}
|
self.homekitHeatingCoolingModeDic = {}
|
||||||
|
|
||||||
|
if self.url == None:
|
||||||
|
LOGGER.error("Configuration needed!")
|
||||||
|
self.speak_dialog('ConfigurationNeeded')
|
||||||
|
else:
|
||||||
requestUrl = self.url+"/items?recursive=false"
|
requestUrl = self.url+"/items?recursive=false"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -291,56 +295,19 @@ class openHABSkill(MycroftSkill):
|
||||||
LOGGER.debug("Request Type: %s" % (requestType))
|
LOGGER.debug("Request Type: %s" % (requestType))
|
||||||
|
|
||||||
unitOfMeasure = self.translate('Degree')
|
unitOfMeasure = self.translate('Degree')
|
||||||
#unitOfMeasure = "degree"
|
|
||||||
infoType = self.translate('Temperature')
|
infoType = self.translate('Temperature')
|
||||||
#infoType = "temperature"
|
|
||||||
|
|
||||||
# if (self.lang == "it-it"):
|
|
||||||
# unitOfMeasure = "gradi"
|
|
||||||
# infoType = "temperatura"
|
|
||||||
|
|
||||||
# if (self.lang == "de-de"):
|
|
||||||
# unitOfMeasure = "Grad"
|
|
||||||
# infoType = "Temperatur"
|
|
||||||
|
|
||||||
# if (self.lang == "es-es"):
|
|
||||||
# unitOfMeasure = "grados"
|
|
||||||
# infoType = "temperatura"
|
|
||||||
|
|
||||||
self.currStatusItemsDic = dict()
|
self.currStatusItemsDic = dict()
|
||||||
|
|
||||||
#if((requestType == "temperature") or (requestType == "la temperatura") or (requestType == "temperatur") or (requestType == "temperatura")):
|
|
||||||
if self.voc_match(requestType, 'Temperature'):
|
if self.voc_match(requestType, 'Temperature'):
|
||||||
self.currStatusItemsDic.update(self.currentTempItemsDic)
|
self.currStatusItemsDic.update(self.currentTempItemsDic)
|
||||||
#elif((requestType == "humidity") or (requestType == "l'umidità") or (requestType == "Feuchtigkeit") or (requestType == "humedad")):
|
|
||||||
elif self.voc_match(requestType, 'Humidity'):
|
elif self.voc_match(requestType, 'Humidity'):
|
||||||
#unitOfMeasure = "percentage"
|
|
||||||
unitOfMeasure = self.translate('Percentage')
|
unitOfMeasure = self.translate('Percentage')
|
||||||
#infoType = "humidity"
|
|
||||||
infoType = self.translate('Humidity')
|
infoType = self.translate('Humidity')
|
||||||
# if (self.lang == "it-it"):
|
|
||||||
# unitOfMeasure = "percento"
|
|
||||||
# infoType = "umidità"
|
|
||||||
# if (self.lang == "de-de"):
|
|
||||||
# unitOfMeasure = "Prozentsatz"
|
|
||||||
# infoType = "Feuchtigkeit"
|
|
||||||
# if (self.lang == "es-es"):
|
|
||||||
# unitOfMeasure = "porciento"
|
|
||||||
# infoType = "humedad"
|
|
||||||
self.currStatusItemsDic.update(self.currentHumItemsDic)
|
self.currStatusItemsDic.update(self.currentHumItemsDic)
|
||||||
#elif((requestType == "status") or (requestType == "lo stato") or (requestType == "Status") or (requestType == "estado")):
|
|
||||||
elif self.voc_match(requestType, 'Status'):
|
elif self.voc_match(requestType, 'Status'):
|
||||||
#infoType = "status"
|
|
||||||
infoType = self.translate('Status')
|
infoType = self.translate('Status')
|
||||||
unitOfMeasure = ""
|
unitOfMeasure = ""
|
||||||
# if (self.lang == "it-it"):
|
|
||||||
# unitOfMeasure = "stato"
|
|
||||||
|
|
||||||
# if (self.lang == "de-de"):
|
|
||||||
# unitOfMeasure = "Status"
|
|
||||||
|
|
||||||
# if (self.lang == "es-es"):
|
|
||||||
# unitOfMeasure = "estado"
|
|
||||||
self.currStatusItemsDic.update(self.switchableItemsDic)
|
self.currStatusItemsDic.update(self.switchableItemsDic)
|
||||||
else:
|
else:
|
||||||
self.currStatusItemsDic.update(self.targetTemperatureItemsDic)
|
self.currStatusItemsDic.update(self.targetTemperatureItemsDic)
|
||||||
|
@ -365,14 +332,12 @@ class openHABSkill(MycroftSkill):
|
||||||
ohItem = self.findItemName(self.targetTemperatureItemsDic, messageItem)
|
ohItem = self.findItemName(self.targetTemperatureItemsDic, messageItem)
|
||||||
|
|
||||||
if ohItem != None:
|
if ohItem != None:
|
||||||
#if((command == "regulate") or (command == "adjust") or (command == "tune") or (command == "regola") or (command == "aggiusta") or (command == "metti") or (command == "reguliere") or (command == "stell") or (command == "pass") or (command == "regula") or (command == "ajusta") or (command == "afina")):
|
|
||||||
if self.voc_match(command, 'Regulate'):
|
if self.voc_match(command, 'Regulate'):
|
||||||
statusCode = self.sendCommandToItem(ohItem, tempVal)
|
statusCode = self.sendCommandToItem(ohItem, tempVal)
|
||||||
newTempValue = tempVal
|
newTempValue = tempVal
|
||||||
else:
|
else:
|
||||||
state = self.getCurrentItemStatus(ohItem)
|
state = self.getCurrentItemStatus(ohItem)
|
||||||
if ((state != None) and (state.isdigit())):
|
if ((state != None) and (state.isdigit())):
|
||||||
#if ((command == "increase") or (command == "incrementa") or (command == "erhöhe") or (command == "aumenta")):
|
|
||||||
if self.voc_match(command, 'Increase'):
|
if self.voc_match(command, 'Increase'):
|
||||||
newTempValue = int(state)+(int(tempVal))
|
newTempValue = int(state)+(int(tempVal))
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
(was ist|wie ist|worauf ist) (der|die|) {item} {requesttype}
|
(was ist|wie ist|worauf ist) (der|die) {item} {requesttype}
|
||||||
(was ist|wie ist|worauf ist) (der|die|) {requesttype} des {item}
|
(was ist|wie ist|worauf ist) (der|die) {requesttype} des {item}
|
||||||
Sag mir (der|die|) {item} {requesttype}
|
Sag mir (der|die) {item} {requesttype}
|
||||||
Sag mir (der|die|) {requesttype} des {item}
|
Sag mir (der|die) {requesttype} des {item}
|
||||||
Sag mir wie ist (der|die|) {item} {requesttype}
|
Sag mir wie ist (der|die) {item} {requesttype}
|
||||||
Ich möchte wissen (der|die|) {item} {requesttype}
|
Ich möchte wissen (der|die) {item} {requesttype}
|
||||||
Ich möchte wissen (der|die|) {requesttype} des {item}
|
Ich möchte wissen (der|die) {requesttype} des {item}
|
||||||
Ich möchte wissen wie ist (der|die|) {item} {requesttype}
|
Ich möchte wissen wie ist (der|die) {item} {requesttype}
|
|
@ -1,9 +1,9 @@
|
||||||
(what's|what is) (the|) {item} {requesttype}
|
(what's|what is) the {item} {requesttype}
|
||||||
(what's|what is) (the|) {requesttype} of {item}
|
(what's|what is) the {requesttype} of {item}
|
||||||
how (the| ) {item} is {requesttype}
|
how the {item} is {requesttype}
|
||||||
tell me (the|) {item} {requesttype}
|
tell me the {item} {requesttype}
|
||||||
tell me (the|) {requesttype} of {item}
|
tell me the {requesttype} of {item}
|
||||||
tell me how (the|) {item} is {requesttype}
|
tell me how the {item} is {requesttype}
|
||||||
I'd like to know {item} {requesttype}
|
I'd like to know the {item} {requesttype}
|
||||||
I'd like to know (the|) {requesttype} of {item}
|
I'd like to know the {requesttype} of {item}
|
||||||
I'd like to know how (the|) {item} is {requesttype}
|
I'd like to know how the {item} is {requesttype}
|
|
@ -1,3 +1,3 @@
|
||||||
(quale è|qual'è|com'è|come è) {requesttype} {item}
|
(quale è|qual'è|com'è|come è) (la|lo|l'|) {requesttype} {item}
|
||||||
vorrei sapere (quale è|qual'è|com'è|come è|) {requesttype} {item}
|
vorrei sapere (quale è|qual'è|com'è|come è|) (la|lo|l'|) {requesttype} {item}
|
||||||
dimmmi (quale è|qual'è|com'è|come è|) {requesttype} {item}
|
dimmmi (quale è|qual'è|com'è|come è|) (la|lo|l'|) {requesttype} {item}
|
Reference in New Issue