I guess this is the
dayRain reference you mentioned in your other post. The problem with digging into the code is that you need to read it in its entirety, in this case, earlier on in
restx.py you will find
a comment that mentions
dayRain. In my response to your other post I mentioned that some drivers pass on a field
dayRain to WeeWX, the
dayRain entry/code you found in
restx.py will make use of the current
dayRain field if it is available, if it is not available WeeWX will calculate the value from the rain data in the database. Remember, WeeWX (generally) makes all fields received from the driver available in the current archive record, this is irrespective of whether the fields exist in the database. So if the driver passes through
dayRain,
dayRain will appear in the current archive record irrespective of whether
dayRain is in the database schema. The same thing will happen if
dayRain is in the database schema, but in this case
dayRain is also saved to database.