@property
def unit_of_measurement(self) -> (str | None):
    'Return the measurement unit for the sensor.'
    if self.dev.name.endswith('_temp'):
        if (self.dev.system.temp_unit == 'F'):
            return TEMP_FAHRENHEIT
        return TEMP_CELSIUS
    return None
Return the measurement unit for the sensor.
@property
def unit_of_measurement(self) -> (str | None):
    
    if self.dev.name.endswith('_temp'):
        if (self.dev.system.temp_unit == 'F'):
            return TEMP_FAHRENHEIT
        return TEMP_CELSIUS
    return None