Sorry I missed the triple = comparison. You are absolutely correct that should compare value and type. So the problem isn’t there, and after a second look, that function is checking weather data, not the values of the weights. I read way too fast.
We would need all of the weights and the temp, humidity,and precip values from weather to figure it out.