mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	AQICalculator is off by 1 (#1331)
Co-authored-by: Igor Katkov <ikatkov@atlassian.com>
This commit is contained in:
		
				
					committed by
					
						 Guillermo Ruffino
						Guillermo Ruffino
					
				
			
			
				
	
			
			
			
						parent
						
							bd061ac2ee
						
					
				
				
					commit
					9cd21bb5a0
				
			| @@ -33,7 +33,7 @@ class AQICalculator : public AbstractAQICalculator { | ||||
|   } | ||||
|  | ||||
|   int get_grid_index_(uint16_t value, int array[AMOUNT_OF_LEVELS][2]) { | ||||
|     for (int i = 0; i < AMOUNT_OF_LEVELS - 1; i++) { | ||||
|     for (int i = 0; i < AMOUNT_OF_LEVELS; i++) { | ||||
|       if (value >= array[i][0] && value <= array[i][1]) { | ||||
|         return i; | ||||
|       } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user