How to compare an entity with exist slot value in custom_slot

I want to use custom slot to change different action by different slot value. the duration between two dates was needed, but custom slot only support one value. How to extend it? I add another solt that the value was calculated in validate func. I got the error msg below. and the self.value is None in What should I do?

Action 'delivery_form' set a slot type 'deliveryDuration' that it never set during the training. 
This can throw of the prediction. 
Make sure to include training examples in your stories for the different types 
of slots this action can return. 
Remember: you need to set the slots manually in the stories by 
adding '- slot{"deliveryDuration": 0}' after the action.

this is my

 class DeliveryDateSlot(Slot):                                                                                                                                                                                                                                          
     def feature_dimensionality(self):                                                                                                       return 6                                                                                                                   
     def as_feature(self):                                                                                                          
         r = [0.0] * self.feature_dimensionality()                                                                                 "----------- %s ---------" % self.value)                                                                       
         if self.value:                                                                                                                          
             if self.value == -99999:                                                                                               
                 r[0] = 1.0                                                                                                                   
             elif self.value > -99999 and self.value <= -1:                                                                         
                 r[1] = 1.0                                                                                                         
             elif self.value == 0:                                                                                                  
                 r[2] = 1.0                                                                                                                      
             elif self.value >=1 and self.value <=7:                                                                                
                 r[3] = 1.0                                                                                                                     
             elif self.value >=8:                                                                                                   
                 r[4] = 1.0                                                                                                                      
                 r[5] = 0                                                                                                                    
         return r

and this is my domain.yml

     type: custom_slot.DeliveryDateSlot                                                                                             
     auto_fill: false

I am looking forward to your early reply