<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def brightness(self, brightness):
 """ Set the brightness. :param brightness: Value to set (0.0-1.0). """

        try:
            cmd = self.command_set.brightness(brightness)
            self.send(cmd)
            self._brightness = brightness
        except AttributeError:
            self._setter('_brightness', brightness,
                         self._dimmest, self._brightest,
                         self._to_brightness)