Ok, found the solution.
I digged into the code dev branch of home assistant and found following file in \home-assistant\components\sensor\mysensors.py
In this file the defaults for each type op sensor are defined in an array.
SENSORS = {
'V_TEMP': [None, 'mdi:thermometer'],
'V_HUM': ['%', 'mdi:water-percent'],
'V_DIMMER': ['%', 'mdi:percent'],
'V_LIGHT_LEVEL': ['%', 'white-balance-sunny'],
'V_DIRECTION': ['°', 'mdi:compass'],
'V_WEIGHT': ['kg', 'mdi:weight-kilogram'],
'V_DISTANCE': ['m', 'mdi:ruler'],
'V_IMPEDANCE': ['ohm', None],
'V_WATT': ['W', None],
'V_KWH': ['kWh', None],
'V_FLOW': ['m', None],
'V_VOLUME': ['m³', None],
'V_VOLTAGE': ['V', 'mdi:flash'],
'V_CURRENT': ['A', 'mdi:flash-auto'],
'V_PERCENTAGE': ['%', 'mdi:percent'],
'V_LEVEL': {
'S_SOUND': ['dB', 'mdi:volume-high'], 'S_VIBRATION': ['Hz', None],
'S_LIGHT_LEVEL': ['lx', 'white-balance-sunny']},
'V_ORP': ['mV', None],
'V_EC': ['μS/cm', None],
'V_VAR': ['var', None],
'V_VA': ['VA', None],
}
So for V_DISTANCE the default is ‘m’.
Seeing that the penny dropped finally. The first sensor is one that I activated one year ago.
The second is the one I activated this weekend.
I updated also the first one with the latest mysensor lib 2.3.2 to be sure that the sketch code of the two sensors was identical.
I forgot that I did a customisation of the auto detected sensor, I changed the default ‘m’ to ‘cm’ in my case because the sensors are outputting centimeters.