Hallo zusammen
bei der Vorbereitung zur Umstellung auf OH2 habe ich natürlich meine alten Rules kopiert und bekomme nun im SmartHomeDesigner diverse Meldungen angezeigt
1)
Meldung: The use of wildcard imports is deprecated.
Leider habe ich keine Info gefunden welche einzelnen items ich importieren müsste
2)
Meldung: Multiple markers at this line
- The word 'Anwesenheitssimulation' is not correctly spelled
- The word 'gestartet' is not correctly spelled
- The method pushNotification(String, String) is undefined
Die Rechtschreibüberprüfung vernachlässige ich mal, aber warum ist die Methode nicht definiert?? Funktionieren tut das Ganze.
Ebenso ist die Methode sendMail nicht definiert?!
Die Bindings habe ich natürlich installiert
3) Folgende Rule funkioniert und wurde in OH1 nie angemeckert
Meldung: Ambiguous binary operation. The operator declarations operator_equals(Number, Number) in NumberExtensions and operator_equals(Type, Number) in NumberExtensions both match.
Ist bestimmt ganz einfach, aber für mich das berühmte "Böhmische Dorf"
bei der Vorbereitung zur Umstellung auf OH2 habe ich natürlich meine alten Rules kopiert und bekomme nun im SmartHomeDesigner diverse Meldungen angezeigt

1)
Code:
import org.openhab.core.library.types.* import org.openhab.core.persistence.* import org.openhab.model.script.actions.*
Leider habe ich keine Info gefunden welche einzelnen items ich importieren müsste

2)
Code:
if (!pushNotification("Attention", "Anwesenheitssimulation gestartet !!")) { sendMail("xxmeineApiIDyy@api.prowlapp.com", "Attention", "Anwesenheitssimulation gestartet !!") }
- The word 'Anwesenheitssimulation' is not correctly spelled
- The word 'gestartet' is not correctly spelled
- The method pushNotification(String, String) is undefined
Die Rechtschreibüberprüfung vernachlässige ich mal, aber warum ist die Methode nicht definiert?? Funktionieren tut das Ganze.
Ebenso ist die Methode sendMail nicht definiert?!
Die Bindings habe ich natürlich installiert
3) Folgende Rule funkioniert und wurde in OH1 nie angemeckert
Code:
rule "Set Ventilator" when Item Ventilator received command then if (Ventilator.state as DecimalType==0) VentAktor1.sendCommand(OFF) else if (Ventilator.state as DecimalType==1) VentAktor1.sendCommand(ON) else if (Ventilator.state as DecimalType==2) VentAktor2.sendCommand(ON) end
Ist bestimmt ganz einfach, aber für mich das berühmte "Böhmische Dorf"

Kommentar