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 custom_slot.py. 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 custom_slot.py

 class DeliveryDateSlot(Slot):                                                                                                                                                                                                                                          
     def feature_dimensionality(self):                                                                                                       return 6                                                                                                                   
                                                                                                                                    
     def as_feature(self):                                                                                                          
         r = [0.0] * self.feature_dimensionality()                                                                                           logger.info("----------- %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                                                                                                                      
             else:                                                                                                                  
                 r[5] = 0                                                                                                                    
         return r

and this is my domain.yml

   deliveryDuration:                                                                                                                    
     type: custom_slot.DeliveryDateSlot                                                                                             
     auto_fill: false

I am looking forward to your early reply