As @jpetrone said if the hub doesn’t receive any events from the thermostat within a specified period of time, it marks the thermostat offline.
We have seen in our lab, some thermostat models firmwares lose directional connectivity with the hub, ie you can send it commands but not receive updates or vice versa. This was explained many posts above and is sometimes related to fluctuating power supply issues.
The simplest solution is to reset it as explained here:
If it still happens, the other solution is to exclude the device, factory reset it (see first post) and then pair it again.