adb – Sending a fictitious sensor value to a real Android device

Is it possible to simulate an event on a real Android device?

Specifically, I want to test an application that does something if a particular temperature value is detected. Is there an adb command, or something else, to send a dummy sensor value to the device to check the behavior of the application?

Thank you.