OH3: Getting TriggeringItemName and PreviousState of Thing changed

But it worked absolutely sure:


rule
	"regelOfflineGarage"
when
	Thing "homematic:HG-HM-LC-Sw4-WM:11442233:OEQ0274516" changed to ONLINE
then
	logInfo("offline.rules", "regelOfflineGarage: Thing geht ONLINE. Status davor: "+ previousState )
	if ( previousState.toString == "INITIALIZING" ) logInfo("offline.rules", "regelOfflineGarage: Abbruch wegen Status INITIALIZING davor." )
	else if ( counterfunction.apply( OfflineCounterGarage )) {
		Garage_1_State.sendCommand( OFF )
		Garage_2_State.sendCommand( OFF )
		Garage_3_State.sendCommand( OFF )
		st_garage_faehrt_auf.sendCommand( OFF )
		st_garage_faehrt_ab.sendCommand( OFF )
		Garage_1_OnTimeAutomatic.sendCommand( 1.1 )
		Garage_2_OnTimeAutomatic.sendCommand( 1.1 )
		Garage_3_OnTimeAutomatic.sendCommand( 1.1 )
	}
end