Mostly amounts to checking on probe (I think all OnStep > 3.6 are good. However, Not sure if all versions will return or if they'll timeout.) Changing types to use double specifically vs the int (and it handles that error, if not doubles) and moving it to it's own update function.
The (BMP/BME)280 series temperature isn't the most reliable for ambient conditions, as the temp sensor is intended mostly to compensate the pressure sensor. It will be a bit hotter than all the other sensors I've tested by 1-2C, unless read only rarely. (30sec+) It is good for low power though. I've used them for wifi sensors that last for a *long* time on batteries.