code: def brightness(self):
          
          if self.mode == "ww":
              return int(self.raw_state[9])
          else:
              _, _, v = colorsys.rgb_to_hsv(*self.getRgb())
              return v
docs: Return current brightness 0-255.
  
          For warm white return current led level. For RGB
          calculate the HSV and return the 'value'.