@property
def device_class(self) -> (str | None):
    'Return the class of the sensor.'
    if self.dev.name.endswith('_temp'):
        return DEVICE_CLASS_TEMPERATURE
    return None
Return the class of the sensor.
@property
def device_class(self) -> (str | None):
    
    if self.dev.name.endswith('_temp'):
        return DEVICE_CLASS_TEMPERATURE
    return None