Set pwm values on the controlled pins.

        :param values: Values to set (0.0-1.0).
        :return:

def set_pwm(self, values):
        """
        Set pwm values on the controlled pins.

        :param values: Values to set (0.0-1.0).
        :return:
        """
        if len(values) != len(self._pins):
            raise ValueError('Number of values has to be identical with '
                             'the number of pins.')
        if not all(0 <= v <= 1 for v in values):
            raise ValueError('Values must be between 0 and 1.')

        for tries in range(self.IO_TRIES):
            try:
                self._set_pwm(self._to_raw_pwm(values))
                break
            except IOError as error:
                if tries == self.IO_TRIES - 1:
                    raise error
        self._state = values