Not an issue with smart thermostats, their batteries are constantly charged through the wiring.
Plus, if your batteries run out, then you wouldn't be able to change the temperature anyway. You have far bigger problems than the device being online only.