code: def set_hsb(self, hue, saturation, brightness=None, *, index=0,
                  transition_time=None):
          
          self._value_validate(hue, RANGE_HUE, "Hue")
          self._value_validate(saturation, RANGE_SATURATION, "Saturation")
  
          values = {
              ATTR_LIGHT_COLOR_SATURATION: saturation,
              ATTR_LIGHT_COLOR_HUE: hue
          }
  
          if brightness is not None:
              values[ATTR_LIGHT_DIMMER] = brightness
              self._value_validate(brightness, RANGE_BRIGHTNESS, "Brightness")
  
          if transition_time is not None:
              values[ATTR_TRANSITION_TIME] = transition_time
  
          return self.set_values(values, index=index)
docs: Set HSB color settings of the light.