Smart Gas Thermostat with Flow Detection