Hi people,
I am facing a problem when migrating from openhab 2.5.11 to 3.0.0. I have a rules file with a hashmap with a Sting linked to a DateTime like so:
import java.util.Map
val Map<String, DateTime> timersend = newHashMap
This worked perfectly in openhab 2.5. Now I am getting:
2020-12-29 19:11:08.656 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'rooms_occupied.rules', using it anyway:
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The field Tmp_rooms_occupiedRules.timersend refers to the missing type Object
The number of messages corresponds to the times the hashmap variable is used. If I remove one, the number of messages decreases accordingly.
An example of the ways I am using the variable is:
if(timersend.get(triggername) === null){
//var DateTime timerend = new DateTime(now.plusMinutes(length.intValue))
timerend = new DateTime(now.plusMinutes(length.intValue))
timersend.put(triggername, timerend)
}
As a result of this issue this rule produces errors. In this case:
2020-12-29 19:22:28.806 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'rooms_occupied-2' failed: Unknown variable or command '==='; line 40, column 5, length 35 in rooms_occupied
Please note that I am also using other hashmaps in the same rule file without issue:
val Map<String, Timer> timers = newHashMap
val Map<String, Number> timerslength = newHashMap
I note that this behaviour was already reported earlier here:
The behaviour is exacly the same, in both cases only the hashmap with a DateTime is failing. Has anyone else seen this behaviour and is there a way to fix it?
- Platform information:
- Hardware: Raspberry Pi 4_
- OS: Raspian
- Openhab running on docker
- openHAB version: 3.0.0