'Update units based on unit system.'

def update_unit_of_measurement(self):

    unit_index = {'si': 1, 'us': 2, 'ca': 3, 'uk': 4, 'uk2': 5}.get(self.unit_system, 1)
    self._unit_of_measurement = SENSOR_TYPES[self.type][unit_index]
