Based on the FSM for 2010 Legacy (it looks different but has better writing) I concluded that the black box at the end of the white hose in my pictures above is the cabin temperature sensor or as Subaru calls it "in-vehicle sensor". The white hose is called the aspirator hose and it is connected at the top to the aspirator - a fan sucking air from the hose and thus from the temp sensor.
I also concluded that in my car the sensor is now in a wrong position. The sensor should face the grill cut in the trim panel under and right of the steering column. That will also allow space for the hose to bend nicely as there is plenty of space forward but not sideways. Basically I need to reinstall the sensor rotated 90 degrees to the left.
As for the automated testing FSM is wrong for my 2009 OBK. Using the 2007 FSM and 2009 FSM I was able to figure it out. Here are my notes, maybe someone else will find them useful...
Perform self diagnostic for AC control system - see FSM page AC(diag)-12
From 2009 FSM:
THIS DOESN'T WORK TO GET INTO DIAGNOSTIC. USE 2007 PROCEDURE!
-Start the engine with the A/C switch and front defroster switch pressed.
NOTE: Self-diagnosis can also be performed with ignition switch ON, but start the engine because observing
the magnet clutch operation is difficult.
- All the indicators blink four times.
From 2007 FSM combined with this
post :
THIS WORKS TO GET INTO DIAGNOSTIC
-Turn ignition switch from OFF to ACC and wait for 2 seconds.
-Start the engine with the AUTO switch and FRESH/RECIRC pressed.
All the indicators will blink 4 times. It will then automatically change to inspection mode of sensor and potentiometer. The sunload sensor will likely indicate open circuit unless it is under direct sun. If there is no malfunction code 20 is displayed.
-Change to the actuator, blower fan, and magnet clutch inspection mode by pressing windshield defroster switch. Every 4 seconds it will cycle through testing each. (or when A/C is pressed)
All indicators blinked 5 times not 4 as per FSM.
Then 20 code blinked.
To get into "automatically change to the Inspection Mode of sensor and potentiometer." press front defrost switch. The codes 31 to 38 corresponding to each test mode (see table "OPERATING MODE TABLE" on page AC(DIAG) - 13) are displayed as driver and passenger temperatures. The other display indicators state correspond to the table columns. The display flashes during the test.
While in auto testing mode you can switch to manual (meaning it will stay in each test until manually switched to the next so you can check which vents are blowing air) by pressing A/C button.
You can get out of the testing back to 20 20 flash screen by pressing AUTO button.
Note that for performing self diagnostic for AC control panel I also had to use both manuals:
USE 2009 DIAG PROCEDURE page AC(diag)-3
USE 2007 "SWITCH CHECK TABLE, OPERATION" for the right display elements.