def set_label(label)
      if label.bytes.length > MAX_LABEL_LENGTH
        raise LabelTooLong.new("Label length in bytes must be below or equal to #{MAX_LABEL_LENGTH}")
      end
      while self.label != label
        send_message!(Protocol::Device::SetLabel.new(label: label.encode('utf-8')), wait_for: Protocol::Device::StateLabel)
      end
      self
    end
def set_label(label)
      if label.bytes.length > MAX_LABEL_LENGTH
        raise LabelTooLong.new("Label length in bytes must be below or equal to #{MAX_LABEL_LENGTH}")
      end
      while self.label != label
        send_message!(Protocol::Device::SetLabel.new(label: label.encode('utf-8')), wait_for: Protocol::Device::StateLabel)
      end
      self
    end
Sets the label of the light
 @param label [String] Desired label
 @raise [LabelTooLong] if label is greater than {MAX_LABEL_LENGTH}
 @return [Light] self