fix
This commit is contained in:
		
							parent
							
								
									c436d68a20
								
							
						
					
					
						commit
						192b0881bb
					
				@ -50,7 +50,7 @@ while True:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        print("temperature before cut: " + str(temperature))
 | 
					        print("temperature before cut: " + str(temperature))
 | 
				
			||||||
        # cut temperature to xx.xx if more then tow digits after "."
 | 
					        # cut temperature to xx.xx if more then tow digits after "."
 | 
				
			||||||
        t_split = temperature.split(".")
 | 
					        t_split = str(temperature).split(".")
 | 
				
			||||||
        if len(t_split[1]) > 2:
 | 
					        if len(t_split[1]) > 2:
 | 
				
			||||||
            t_cut = len(t_split[1]) - 2
 | 
					            t_cut = len(t_split[1]) - 2
 | 
				
			||||||
            t_split[1] = t_split[1][:-t_cut]
 | 
					            t_split[1] = t_split[1][:-t_cut]
 | 
				
			||||||
@ -62,7 +62,7 @@ while True:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        print("humidity before cut: " + str(humidity))
 | 
					        print("humidity before cut: " + str(humidity))
 | 
				
			||||||
        # cut humidity to xx.xx if more then tow digits after "."
 | 
					        # cut humidity to xx.xx if more then tow digits after "."
 | 
				
			||||||
        h_split = humidity.split(".")
 | 
					        h_split = str(humidity).split(".")
 | 
				
			||||||
        if len(h_split[1]) > 2:
 | 
					        if len(h_split[1]) > 2:
 | 
				
			||||||
            h_cut = len(h_split[1]) - 2
 | 
					            h_cut = len(h_split[1]) - 2
 | 
				
			||||||
            h_split[1] = h_split[1][:-h_cut]
 | 
					            h_split[1] = h_split[1][:-h_cut]
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user