Here are the possible causes for code B1140:
- Faulty RH Side Airbag Sensor Assembly
- RH Side Airbag Assembly wiring harness is open or shorted
- RH Side Airbag Assembly poor electrical connection in circuit
- Faulty Center Airbag Sensor Assembly
Below is a parts diagram for the airbag system on a 2000 Avalon. Note there are 2 RH airbag sensor assemblies; a front right airbag sensor assembly and a side right airbag sensor assembly. Because the word "front" isn't tied to B1140, I would assume the issue is with the side right airbag sensor assembly (group 89860).
My thought for help would be for you to obtain a side right airbag sensor assembly (part no. 89860-07020) from a salvage yard on a vehicle that doesn't look to have been in an accident and swap yours out with the used sensor and see if the problem doesn't return. If it does again, I would next move to replacing the center airbag sensor assembly (part no. 89170-07120 or 89170-07121, based upon when your Avalon was built) with a salvage used center airbag sensor assembly. Given you had a couple of months between getting this code B1140, I'm thinking the chance of a wiring problem causing this is low (unless your Avalon has been involved in an accident at some point in its life). Just my thoughts, would be good for others to offer their thoughts.