def format_sensor(self, sensor):
current_val = sensor.current<EOL>if self.pango_enabled:<EOL><INDENT>percentage = self.percentage(sensor.current, sensor.critical)<EOL>if self.dynamic_color:<EOL><INDENT>color = self.colors[int(percentage)]<EOL>return self.format_pango(color, current_val)<EOL><DEDENT><DEDENT>return current_val<EOL>
Format a sensor value. If pango is enabled color is per sensor.